#include "emulator.h"
#include "platforms/platforms.h"
#include "input/input.h"
+#include "m68kcpu.h"
#include "platforms/amiga/Gayle.h"
#include "platforms/amiga/amiga-registers.h"
unsigned int write_addr[8];
unsigned int write_upper[8];
unsigned char *write_data[8];
+address_translation_cache code_translation_cache = {0};
int kb_hook_enabled = 0;
int mouse_hook_enabled = 0;
value = *(gpio + 13);
if (!(value & (1 << PIN_IPL_ZERO))) {
- irq = 1;
old_irq = irq_delay;
//NOP
- M68K_END_TIMESLICE;
- NOP
+ if (!irq) {
+ M68K_END_TIMESLICE;
+ NOP
+ irq = 1;
+ }
//usleep(0);
}
else {
int main(int argc, char *argv[]) {
int g;
+
+ ps_setup_protocol();
+
//const struct sched_param priority = {99};
// Some command line switch stuffles
switch_config:
srand(clock());
- ps_setup_protocol();
ps_reset_state_machine();
ps_pulse_reset();
usleep(1500);
if (address & 0xFF000000)
return;
- if (address & 0x01)
- printf("Unaligned WORD write!\n");
+ if (address & 0x01) {
+ write8(value & 0xFF, address);
+ write8((value >> 8) & 0xFF, address + 1);
+ return;
+ }
write16((uint32_t)address, value);
return;
if (address & 0xFF000000)
return;
- if (address & 0x01)
- printf("Unaligned LONGWORD write!\n");
+ if (address & 0x01) {
+ write8(value & 0xFF, address);
+ write16(htobe16(((value >> 8) & 0xFFFF)), address + 1);
+ write8((value >> 24), address + 3);
+ return;
+ }
write16(address, value >> 16);
write16(address + 2, value);