slightfoot / dart_z80

Dart implementation of the Zilog Z80 Microprocessor.
MIT License
6 stars 2 forks source link

How to access to registers? #1

Open cool2apps opened 6 months ago

cool2apps commented 6 months ago

Hello, I would like to restore from a snapshot file format for a zx spectrum emulator. I need to set the registers to restore snapshot. I could not find a way to access to registers. How to access and set the registers? Thanks

slightfoot commented 3 months ago

@cool2apps you can create an instance of Z80CPU and use the state getter/setter to change the register set.

https://pub.dev/documentation/z80/latest/z80/Z80CPU-class.html https://pub.dev/documentation/z80/latest/z80/Z80State/state.html