9d40f5026a
cpu: change cpu cycle calculation
...
The Gameboy CPU runs at ~4MHz, but all the instructions take some
number of cycles divisible by 4.
This patch causes the cpu_cycle() to run a single 1MHz cycle, instead
of requiring 4 calls at 4MHz to perform the same emulation. Based on
the code in gbdb, the video controller now appears to run much slower,
and the timings needs to be verified.
This results in a large performance gain.
2018-07-01 22:00:02 +00:00
e520e64bc4
cpu: fix C flag calculation during ADD A,*
2018-06-17 14:34:09 -07:00
6e3c9f4448
cpu: implement all BIT, SET, and RES opcodes
...
The CPU now runs until it hits a "HALT" instruction in my test game.
2018-06-17 14:34:09 -07:00
fb1deb05d5
cpu: correct opcode 0x22 to be "LD (HL+), A"
2018-06-17 14:34:09 -07:00
c1f972c448
cpu: fix DEC C to decrement the correct register
...
Now the CPU runs to the end of the boot ROM
2018-06-17 14:34:09 -07:00
1a0dcbdb81
cpu: implement LDH instructions
2018-02-19 06:51:28 +00:00
d62a8d3f0e
cpu: implement enought to make bootrom use display hardware
2018-01-01 16:51:56 -08:00
3f11a3a167
cpu: rewrite to a single switch-based dispatch
...
This will make it easier to experiment with direct-threading in the future.
2017-11-19 18:39:12 -08:00
8e3a8056fa
WIP: idk
2017-09-17 10:35:55 -04:00
f76d384e6d
cpu: define get_reg functions as const
...
This will be useful in the future when we want to reference the CPU
state in a const-way.
2017-05-31 22:03:26 -07:00
e5acc3088c
treewide: restucture source tree per project
...
Signed-off-by: Max Regan <mgregan2@gmail.com >
2017-05-10 22:40:12 -07:00