sy2002 / QNICE-FPGA

QNICE-FPGA is a 16-bit computer system for recreational programming built as a fully-fledged System-on-a-Chip in portable VHDL.
http://qnice-fpga.com
Other
69 stars 16 forks source link

Hardware CPU: Save/Restore R8 to R12 in shadow registers during INT #172

Closed sy2002 closed 4 years ago

sy2002 commented 4 years ago

Enhance CPU to save/restore R8 to R12 in shadow registers during interrupts (hardware and software)

Context: https://github.com/sy2002/QNICE-FPGA/issues/77#issuecomment-711412906

MJoergen commented 4 years ago

I'm updating the maze2d game to include a timer interrupt based clock. It works in the emulator, and it would be great to have it working in hardware too. Just to let you know I hope you implement this soon :-D

sy2002 commented 4 years ago

I plan to do it today evening :-D

MJoergen commented 4 years ago

I've implemented this now. I've verified no regression with the cpu_test.asm program, and I've extended the int_test.asm program to test the new feature.

The implementation is somewhat verbose, and can perhaps be refactored.

sy2002 commented 4 years ago

Thank you - due to my end of year crazyness it is unlikely that I contribute anything meaningful "before Christmas" :-) And indeed: This does need refactoring - but this is not urgent, so I close this issue.