Skip to content

Commit

Permalink
2.3.5: minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
acaldero committed Sep 14, 2024
1 parent 87db621 commit a5a94e4
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 27 deletions.
4 changes: 2 additions & 2 deletions sim_core/sim_cfg.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
var wscfg = {
/* version */
"version": { upgrade:false, type:"string", value:"2.3.5" },
"build": { upgrade:true, type:"string", value:"2.3.5.20240715A" },
"build": { upgrade:true, type:"string", value:"2.3.5.20240902A" },

/* simulation screen: SVG */
"color_data_active": { upgrade:false, type:"string", value:"#0066FF" },
Expand All @@ -242,7 +242,7 @@
"DBG_delay": { upgrade:false, type:"int", value:5 },
"DBG_level": { upgrade:false, type:"string", value:"microinstruction" },
"DBG_limitins": { upgrade:false, type:"int", value:10000 },
"DBG_limitick": { upgrade:false, type:"int", value:1000 },
"DBG_limitick": { upgrade:false, type:"int", value:2000 },
"DBG_skip_notifycolon": { upgrade:false, type:"boolean", value:false },
"ICON_theme": { upgrade:false, type:"string", value:'classic' },
"AS_enable": { upgrade:false, type:"boolean", value:true },
Expand Down
12 changes: 6 additions & 6 deletions sim_hw/hw_items/io_l3d_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ function io_l3d_base_register ( sim_p )
set_value(sim_p.states[s_expr[2]], iodr);
}
if (bus_ab == L3DSR_ID) {
var x = (iodr & 0xFF000000) >> 24 ;
var y = (iodr & 0x00FF0000) >> 16 ;
var z = (iodr & 0x0000FF00) >> 8 ;
var x = (iodr & 0xFF000000) >>> 24 ;
var y = (iodr & 0x00FF0000) >>> 16 ;
var z = (iodr & 0x0000FF00) >>> 8 ;

var p = z*Math.pow(sim_p.internal_states.l3d_dim, 2) +
y*sim_p.internal_states.l3d_dim +
Expand Down Expand Up @@ -204,9 +204,9 @@ function io_l3d_base_register ( sim_p )
set_value(sim_p.states[s_expr[4]], bus_db) ;

// update internal state
var x = (bus_db & 0xFF000000) >> 24 ;
var y = (bus_db & 0x00FF0000) >> 16 ;
var z = (bus_db & 0x0000FF00) >> 8 ;
var x = (bus_db & 0xFF000000) >>> 24 ;
var y = (bus_db & 0x00FF0000) >>> 16 ;
var z = (bus_db & 0x0000FF00) >>> 8 ;

var p = z*Math.pow(sim_p.internal_states.l3d_dim, 2) +
y*sim_p.internal_states.l3d_dim +
Expand Down
20 changes: 10 additions & 10 deletions sim_hw/hw_items/io_ldm_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ function io_ldm_base_register ( sim_p )
set_value(sim_p.states[s_expr[2]], iodr);
}
if (bus_ab == LEDMSR_ID) {
var x = (iodr & 0xFF000000) >> 24 ;
var y = (iodr & 0x00FF0000) >> 16 ;
var x = (iodr & 0xFF000000) >>> 24 ;
var y = (iodr & 0x00FF0000) >>> 16 ;

var p = y*sim_p.internal_states.ledm_dim + x ;
var s = get_var(sim_p.internal_states.ledm_state[p].color) ;
Expand Down Expand Up @@ -207,8 +207,8 @@ function io_ldm_base_register ( sim_p )
// 0x10 -> set pixel
if (0x10 & bus_db)
{
var x = (dr & 0xFF000000) >> 24 ;
var y = (dr & 0x00FF0000) >> 16 ;
var x = (dr & 0xFF000000) >>> 24 ;
var y = (dr & 0x00FF0000) >>> 16 ;
var s = (dr & 0x000000FF) ;

set_value(sim_p.states[s_expr[3]], 1) ;
Expand All @@ -234,10 +234,10 @@ function io_ldm_base_register ( sim_p )
var neltos = sim_p.internal_states.ledm_neltos ;
for (var p=0; p<neltos; p=p+4) {
s = simcore_native_get_value("MEMORY", dr+p) ;
set_var(sim_p.internal_states.ledm_state[p+0].color, (s & 0x000000FF) >> 0);
set_var(sim_p.internal_states.ledm_state[p+1].color, (s & 0x0000FF00) >> 8);
set_var(sim_p.internal_states.ledm_state[p+2].color, (s & 0x00FF0000) >> 16);
set_var(sim_p.internal_states.ledm_state[p+3].color, (s & 0xFF000000) >> 24);
set_var(sim_p.internal_states.ledm_state[p+0].color, (s & 0x000000FF) >>> 0);
set_var(sim_p.internal_states.ledm_state[p+1].color, (s & 0x0000FF00) >>> 8);
set_var(sim_p.internal_states.ledm_state[p+2].color, (s & 0x00FF0000) >>> 16);
set_var(sim_p.internal_states.ledm_state[p+3].color, (s & 0xFF000000) >>> 24);
}
}

Expand Down Expand Up @@ -287,8 +287,8 @@ function io_ldm_base_register ( sim_p )
var dr = get_value(sim_p.states[s_expr[5]]) ;
if (0x10 & bus_db)
{
var x = (dr & 0xFF000000) >> 24 ;
var y = (dr & 0x00FF0000) >> 16 ;
var x = (dr & 0xFF000000) >>> 24 ;
var y = (dr & 0x00FF0000) >>> 16 ;
var s = (dr & 0x000000FF) ;
verbal = "I/O device write at LEDMCR with value " + bus_db + " (set pixel x:" + x + ", y:" + y + ", with color:" + s + "). " ;

Expand Down
8 changes: 5 additions & 3 deletions wepsim_core/wepsim_checkpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,12 @@
var elements = {} ;

// check params
if (typeof nbObj.cells === "undefined")
if (typeof nbObj.cells === "undefined") {
return elements ;
if (typeof nbObj.cells.length === "undefined")
}
if (typeof nbObj.cells.length === "undefined") {
return elements ;
}

// convert NB -> Obj
var key = "" ;
Expand All @@ -302,7 +304,7 @@
type = nbObj.cells[i].metadata.type ;
value = nbObj.cells[i].source ;

if (type !== "string") {
if (["string", "code"].includes(type) == false) {
value = JSON.parse(value) ;
}

Expand Down
2 changes: 1 addition & 1 deletion ws_dist/min.sim_all.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ws_dist/min.wepsim_core.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ws_dist/min.wepsim_node.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ws_dist/min.wepsim_web.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ws_dist/repo/hardware/ep/hw_def.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ws_dist/repo/hardware/poc/hw_def.json

Large diffs are not rendered by default.

0 comments on commit a5a94e4

Please sign in to comment.