asiekierka / uxnds

NDS/3DS fork/port of the uxn/Varvara virtual machine
MIT License
150 stars 5 forks source link

Uxn core to make use of extraneous 3 opcodes #14

Closed neauoire closed 1 year ago

neauoire commented 1 year ago

The new uxn specs is making use of the 3 free opcodes (0x20, 0x40 and 0x60), see refs to basically addsrelative immediate jumps.

case 0x20: /* JCI */ POP8(b) if(!b) { pc += 2; break; }
case 0x40: /* JMI */ PEEK16(a, pc) pc += a + 2; break;
case 0x60: /* JSI */ PUSH16(u->rst, pc + 2) PEEK16(a, pc) pc += a + 2; break;

See example implementation. There aren't many roms that make use of this yet, it'll roll out slowly during the next few months. But left.rom does use the new opcodes, so if anything shows up then it's a good sign.

asiekierka commented 1 year ago

https://github.com/asiekierka/uxnds/releases/tag/v0.3.6