Welcome to Emulationworld

Forum Index | FAQ | New User | Login | Search

Make a New PostPrevious ThreadView All ThreadsNext ThreadShow in Flat Mode*


SubjectRND opcode problems Reply to this message
Posted byMaxim
Posted on01/30/05 03:39 PM



While we're on Chip-8, I updated my SMS-native emulator with the "new" roms.

There's a problem. Some of the Chip-8 docs specify that the RND opcode should set the specified register to a random number less than or equal to the byte operand. However, this is wrong; it should set it to a random number ANDed with the operand, according to older docs from the HP-48 days. This is certainly a lot simpler to achieve on a simple CPU.

The former is needed for "rocket.ch8"; the latter is needed for "Tetris", otherwise it bugs out all over the place.

The fix I'm using is to edit "rocket.ch8"; change $20 to $1f at offset $49 and $40 to $3f at $4b.

-
Entire Thread
Subject  Posted byPosted On
*flip8 (continued from gen em)  newsdee01/28/05 00:12 AM
..RND opcode problems  Maxim01/30/05 03:39 PM
.*Re: flip8 (continued from gen em)  Jonemaan01/28/05 12:39 PM