Closed chrisguiney closed 3 years ago
Hey there, thanks for reaching out. (And for using this to build your own emulator - so cool!)
Great catch! I think you're right, the change should just be updating that string and the filename. If you're up for making that change, feel free to open up a PR and then tag me on it, and I'll take a look and get it merged in.
Thanks again!
Just made the fix for this. Thanks again for pointing it out!
Hi there, thanks for making this project! It's been really handy while I'm trying to implement my own emulator!
One thing that's tripped me up a bit was the
0xE9
instruction, which is listed asJP,(HL)
. In every other case, the notation(HL)
implies that the address in registerHL
should be dereferenced. However, for0xE9
, that is not the case.The description is correct, that it should be the "contents of register HL", and not "the contents of memory specified by register HL" that is loaded into the program counter.
The pasterizer table also lists it as
JP (HL)
, but the Gameboy Complete Technical Reference pdf agrees that this notation is misleading, having a note stating:I'm not a javascript person, but I'd be happy to take a little bit to contribute the change, if it's something you'd be interested in incorporating.
I believe the change would mostly be just an adjustment to the string mnemonic here: https://github.com/meganesu/generate-gb-opcodes/blob/master/src/generators/jump/JP_memory_at_HL.js#L8
I'm not sure if you'd want the file name changed as well,
JP_memory_at_HL.js
also sounds like it implies the dereference of registerHL