diff gdb_remote.c @ 1752:d6d4c006a7b3

Initial attempt at interrupts in new Z80 core and integrating it into main executable
author Michael Pavone <pavone@retrodev.com>
date Sun, 10 Feb 2019 11:58:23 -0800
parents 85a90964b557
children 8fe162bdb038 52a47611a273
line wrap: on
line diff
--- a/gdb_remote.c	Sat Feb 09 11:52:43 2019 -0800
+++ b/gdb_remote.c	Sun Feb 10 11:58:23 2019 -0800
@@ -132,7 +132,7 @@
 	}
 }
 
-uint8_t read_byte(m68k_context * context, uint32_t address)
+uint8_t m68k_read_byte(m68k_context * context, uint32_t address)
 {
 	
 	genesis_context *gen = context->system;
@@ -150,7 +150,7 @@
 	return 0;
 }
 
-void write_byte(m68k_context * context, uint32_t address, uint8_t value)
+void m68k_write_byte(m68k_context * context, uint32_t address, uint8_t value)
 {
 	genesis_context *gen = context->system;
 	//TODO: Use generated read/write functions so that memory map is properly respected
@@ -170,7 +170,7 @@
 	if (address >= 0xA00000 && address < 0xA04000) {
 		gen->zram[address & 0x1FFF] = value;
 		genesis_context * gen = context->system;
-#ifndef NO_Z80
+#if !defined(NO_Z80) && !defined(NEW_CORE)
 		z80_handle_code_write(address & 0x1FFF, gen->z80);
 #endif
 		return;
@@ -305,7 +305,7 @@
 		char *cur = send_buf;
 		while (size)
 		{
-			hex_8(read_byte(context, address), cur);
+			hex_8(m68k_read_byte(context, address), cur);
 			cur += 2;
 			address++;
 			size--;
@@ -326,7 +326,7 @@
 			tmp[0] = *(cur++);
 			tmp[1] = *(cur++);
 			tmp[2] = 0;
-			write_byte(context, address, strtoul(tmp, NULL, 16));
+			m68k_write_byte(context, address, strtoul(tmp, NULL, 16));
 			address++;
 			size--;
 		}