comparison gdb_remote.c @ 2499:d74d3998482c

Make some progress on compiling full emulator with new 68K core
author Michael Pavone <pavone@retrodev.com>
date Tue, 30 Apr 2024 00:02:14 -0700
parents 8445e814d495
children d44fe974fb85
comparison
equal deleted inserted replaced
2498:dffda054d218 2499:d74d3998482c
126 } 126 }
127 127
128 static uint8_t m68k_read_byte(m68k_context *context, uint32_t address) 128 static uint8_t m68k_read_byte(m68k_context *context, uint32_t address)
129 { 129 {
130 //TODO: share this implementation with builtin debugger 130 //TODO: share this implementation with builtin debugger
131 return read_byte(address, (void **)context->mem_pointers, &context->options->gen, context); 131 return read_byte(address, (void **)context->mem_pointers, &context->opts->gen, context);
132 } 132 }
133 133
134 void m68k_write_byte(m68k_context * context, uint32_t address, uint8_t value) 134 void m68k_write_byte(m68k_context * context, uint32_t address, uint8_t value)
135 { 135 {
136 genesis_context *gen = context->system; 136 genesis_context *gen = context->system;
137 //TODO: Use generated read/write functions so that memory map is properly respected 137 //TODO: Use generated read/write functions so that memory map is properly respected
138 uint16_t * word = get_native_pointer(address & 0xFFFFFFFE, (void **)context->mem_pointers, &context->options->gen); 138 uint16_t * word = get_native_pointer(address & 0xFFFFFFFE, (void **)context->mem_pointers, &context->opts->gen);
139 if (word) { 139 if (word) {
140 if (address & 1) { 140 if (address & 1) {
141 *word = (*word & 0xFF00) | value; 141 *word = (*word & 0xFF00) | value;
142 } else { 142 } else {
143 *word = (*word & 0xFF) | value << 8; 143 *word = (*word & 0xFF) | value << 8;