summaryrefslogtreecommitdiff
path: root/z80_to_x86.c
AgeCommit message (Collapse)Author
2015-11-25Get Z80 core sort of working again post alignment changeMichael Pavone
2015-11-25Partially working change to do proper stack alignment rather than doing a ↵Michael Pavone
lame alignment check when calling a C compile dfunction. 68K core seems okay, but Z80 is busted.
2015-11-13Selecting a second game from the menu now worksMichael Pavone
2015-11-04Improve timing of Z80 busack. Fixes a crash in Barkley: Shut Up and Jam. ↵Michael Pavone
Also vastly improves the audio output of Stuck Somewhere in Time
2015-10-31Small tweaks to timing of 68K/Z80 interactions based on latest testsMichael Pavone
2015-10-31Set flags for ld a, rMichael Pavone
2015-10-29Fix timing of certain variants of LDMichael Pavone
2015-10-29Fix timing of IM instructionMichael Pavone
2015-09-18Fixed a copy pasta error in the implementation of LDD and LDDR. HL should be ↵Michael Pavone
decremented and not incremented in those instructions.
2015-08-01Implement half carry for a couple of the trivial casesMichael Pavone
2015-07-29Added support for an IO memory map in Z80 coreMichael Pavone
2015-07-25Use a new fatal_error function instead of calling fprintf and exit for fatal ↵Michael Pavone
errors. This new function more gracefully handles the case in which BlastEm was not started from a terminal or disconnected from ther terminal (Windows).
2015-06-27Cleanup some warnings under clang through a combination of code fixes and ↵Michael Pavone
supressing specific warnings
2015-05-26Fixes for the 32-bit build accidentally introduced a bug into the 64-bit ↵Michael Pavone
build, this commit fixes the regression
2015-05-25Add a define in both the source and Makefile for enabling logging of z80 ↵Michael Pavone
instruction address/cycle counts. Fix Z80 in/out instructions to eliminate assumptions about which registers are stored in native regs. Fix read_16 to not corrupt the low byte when the read has to call into a C function.
2015-05-25Fix RLD and RRD for the case in which HL does not map to a native registerMichael Pavone
2015-05-24Z80 test cases that passed on 64-bit now pass on 32-bitMichael Pavone
2015-05-24More bugfixes for the 32-bit build of the Z80 coreMichael Pavone
2015-05-23Fix a bunch of assumptions about which Z80 registers are stored in native ↵Michael Pavone
registers to make the x86-32 build less broken
2015-05-17Make sure z80_save_reg does nothing when there is no register in the reg ↵Michael Pavone
field of the instruction. This fixes a bug that corrupted SP in the MDEM 2011 demo
2015-05-17Call z80_handle_deferred after generating an insruction handler so that ↵Michael Pavone
instructions like rst work correctly
2015-05-17Fix crash bug in Z80 interpreterMichael Pavone
2015-05-12Save PC to context struct when syncing Z80 at instruction start. This fixes ↵Michael Pavone
saving savestates and probably the Z80 debugger as well
2015-05-11Remove/comment verbose logging added for tracking down sync bugMichael Pavone
2015-05-11Sync fixes and logging to fix more sync issuesMichael Pavone
2015-01-04MergeMichael Pavone
2015-01-03When going directly from reset to busreq, do not allow the Z80 to runMichael Pavone
2015-01-03Restore Z80 interrupt pulse duration and make a small improvement to debug ↵Michael Pavone
print output
2015-01-03Made the Z80 core more contained by refactoring some code in blastem.c into ↵Michael Pavone
z80_to_x86.c
2015-01-03All cycle counters are now based off the master clock. This seems to have ↵Michael Pavone
messed up Z80 interrupt timing (music in Sonic 2 is too slow for instance), but things are generally working
2015-01-02In theory, the Z80 core should work on 32-bit builds now; however, I suspect ↵Michael Pavone
there is some code that cannot deal with most of the Z80 registers not having a native register so more work will be needed
2015-01-02Added functions to gen_x86 for saving and restoring callee save registers to ↵Michael Pavone
better abstract over ABI differences between x86 and x86-64
2015-01-02Use SZ_PTR instead of SZ_Q in Z80 core for 32-bit compatMichael Pavone
2015-01-02Sync Z80 when taking an interrupt so that int_cycle gets updatedMichael Pavone
2015-01-01Remove dedicated registers for Z80 bank reg and Z80 bank pointer as they are ↵Michael Pavone
no longer used
2015-01-01Add the 3 cycle delay back in to Z80 bank area accessMichael Pavone
2015-01-01Minor Z80 core cleanupMichael Pavone
2015-01-01Use call_args and call_args_abi in Z80 coreMichael Pavone
2015-01-01Remove some of the hard coded assumptions about the memory map from the CPU ↵Michael Pavone
cores
2014-12-30MergeMichael Pavone
2014-12-29Fix handling of code writes for Z80 core. This seems to get things close to ↵Michael Pavone
being back to where they were before the big refactor that broke the Z80 core. Some problems remain. Notably the sound driver in Sonic 2 is still quite broken.
2014-12-26Fix a few bugs introduced in the Z80 core from the adjustments to fit with ↵Michael Pavone
the code gen refactor
2014-12-26Fix an off-by-one error in a branch destination in the generation of ↵Michael Pavone
handle_cycle_limit for the Z80
2014-12-26Update code->cur before calling z80_get_address_trans in ↵Michael Pavone
z80_retranslate_inst to avoid any newly translated instructions from being placed in the "buffer zone". Save the current value of the code_info struct for placing the final jmp instruction in the correct place
2014-12-26Add in missing generated Z80 helper functions. Fix a small bug in Z80_HALT. ↵Michael Pavone
Fix generation of save and load context for Z80
2014-12-22Z80 core is sort of working againMichael Pavone
2014-12-17Get rest of emulator compiling again with Z80 core enabledMichael Pavone
2014-12-17Get Z80 core back into compileable stateMichael Pavone
2014-12-16Fix flags for rra, rrca, rla and rlca. Fix timing for rr, rrc, rl and rlc ↵Michael Pavone
when using IX or IY. Fix access to I and R registers (R still needs to be made 7-bit though). Fix flags for ld a, i. The fix for access to I fixes PCM playback in Titan Overdrive and music playback in Crackdown.
2014-12-14WIP effort to update z80 core for code gen changesMichael Pavone