File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -452,6 +452,11 @@ export class MarieSim {
452452 this . _log [ this . _log . length - 1 ] . type !== 'step'
453453 ) ;
454454
455+ // Recalcular datos totales después de retroceder
456+ if ( typeof window !== 'undefined' ) {
457+ window . dataBytes = calculateDataBytesOccupied ( window . staticDataAddresses ) ;
458+ }
459+
455460 // Decrementar contador global de steps
456461 if ( typeof window !== 'undefined' ) {
457462 window . stepCount = Math . max ( 0 , window . stepCount - 1 ) ;
@@ -632,6 +637,11 @@ export class MarieSim {
632637 window . microStepCount = Math . max ( 0 , window . microStepCount - 1 ) ;
633638 }
634639
640+ // Recalcular datos totales después de retroceder
641+ if ( typeof window !== 'undefined' ) {
642+ window . dataBytes = calculateDataBytesOccupied ( window . staticDataAddresses ) ;
643+ }
644+
635645 return last ;
636646 }
637647
@@ -1007,6 +1017,10 @@ export class MarieSim {
10071017 microSteps : [
10081018 ( sim ) => {
10091019 sim . _halted = true ;
1020+ // Recalcular datos totales al llegar a HALT
1021+ if ( typeof window !== 'undefined' ) {
1022+ window . dataBytes = calculateDataBytesOccupied ( window . staticDataAddresses ) ;
1023+ }
10101024 return {
10111025 type : 'halt' ,
10121026 halt : true ,
You can’t perform that action at this time.
0 commit comments