kosarev / z80

Fast and flexible Z80/i8080 emulator with C++ and Python APIs
MIT License
63 stars 10 forks source link

Register I should be the the most significant byte and register R the least significant byte. #52

Closed hlide closed 1 year ago

hlide commented 1 year ago

https://github.com/kosarev/z80/blob/ec19a48df0cd9c022eeab8f8626e459090578b14/z80.h#L305

It should be: fast_u8 i = self().on_get_i(); fast_u8 r = self().on_get_r(); return make16(i, r); and not: ... return make16(r, i); as it is equivalently done in your code through h and l.

kosarev commented 1 year ago

Fixed in d16c92d, thanks!