Make ROM const

This commit is contained in:
Toby Jaffey 2025-12-09 22:08:53 +00:00
parent 76fba39a21
commit ac554865a6
6 changed files with 11 additions and 7 deletions

View file

@ -2,7 +2,8 @@
#include "uvm32.h"
#include "common/uvm32_common_custom.h"
uint8_t rom[] = {
#if 0
uint8_t rom[] = { // mandel.bin
0x23, 0x26, 0x11, 0x00, 0xef, 0x00, 0xc0, 0x00, 0xb7, 0x08, 0x00, 0x01,
0x73, 0x00, 0x00, 0x00, 0x13, 0x01, 0x01, 0xff, 0x23, 0x26, 0x81, 0x00,
0x37, 0xf5, 0xff, 0xff, 0xb7, 0x15, 0x00, 0x00, 0x37, 0xe6, 0xff, 0xff,
@ -27,6 +28,9 @@ uint8_t rom[] = {
0x67, 0x80, 0x00, 0x00, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f,
0x72, 0x6c, 0x64, 0x00
};
#else
#include "zigtris.h"
#endif
uvm32_state_t vmst;
uvm32_evt_t evt;
@ -49,7 +53,7 @@ void loop(void) {
}
if (isrunning) {
uvm32_run(&vmst, &evt, 100); // num instructions before vm considered hung
uvm32_run(&vmst, &evt, 10000000); // num instructions before vm considered hung
switch(evt.typ) {
case UVM32_EVT_END: