Closed lamogui closed 11 years ago
I open the lem_splash in debug mode: Step by step the splash is displayed. the last valid instruction is SET PC,POP then nest instructions are ???,A (0x0000) may be. If i return to run thes instructions dcpu_wm is not crashing but if i dont use the debug at all mode it crash
Working diseapear with my commit
This can happen, if the DCPU core when are processing A or B parameter of an instrucction, don't enforce that = ram + XXXX is inside of ram size, so reads or writes outside of ram. To fix it, one could do:
ram + (uint16_t)(XXXX)
Or:
ram + ( 0xFFFF & XXXX )
I think that I fixed it, but I could be missed to do it in a line of code.
Whatever the monitor i use. lem_splash always crash