diff options
author | Aaron Giles <aaron@aarongiles.com> | 2008-04-03 05:30:15 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2008-04-03 05:30:15 +0000 |
commit | 0d89ceb44bd48d774c9c12d13317dd56acc417f4 (patch) | |
tree | 469ccb8dffb3d01277634b642d23f5682e08c556 | |
parent | ca3d7d01e65af55c7d3e568dddd79149bc532649 (diff) |
From: Hugh Allen [mailto:hugh2@bigpond.net.au]
Subject: patch for state save in buggybjr
Here's a little patch for initial support of state saving in buggybjr.
(It'll help with tx1 and buggyboy too, but they are non-working)
All I did was get rid of the "anonymous" (temporary) timer that was
preventing saving, and replace it with a "permanent" timer. I didn't go
looking for data which might need to be saved.
-rw-r--r-- | src/mame/machine/tx1.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/mame/machine/tx1.c b/src/mame/machine/tx1.c index 71e2457bccf..abacb524af1 100644 --- a/src/mame/machine/tx1.c +++ b/src/mame/machine/tx1.c @@ -23,6 +23,7 @@ Globals */ static UINT16 *prom; +static emu_timer *interrupt_timer; static struct { @@ -65,7 +66,7 @@ INLINE UINT8 reverse_nibble(UINT8 nibble) static TIMER_CALLBACK( interrupt_callback ) { cpunum_set_input_line_and_vector(machine, 0, 0, HOLD_LINE, 0xff); - timer_set(video_screen_get_time_until_pos(machine->primary_screen, CURSOR_YPOS, CURSOR_XPOS), NULL, 0, interrupt_callback); + timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(machine->primary_screen, CURSOR_YPOS, CURSOR_XPOS), 0); } /* @@ -1477,8 +1478,11 @@ MACHINE_START( tx1 ) /* Initialise for each game */ prom = (UINT16*)memory_region(REGION_USER1) + (0x8000 >> 1); + /* set a timer to run the interrupts */ + interrupt_timer = timer_alloc(interrupt_callback, NULL); + /* /CUDISP CRTC interrupt */ - timer_set(video_screen_get_time_until_pos(machine->primary_screen, CURSOR_YPOS, CURSOR_XPOS), NULL, 0, interrupt_callback); + timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(machine->primary_screen, CURSOR_YPOS, CURSOR_XPOS), 0); } MACHINE_START( buggyboy ) @@ -1488,8 +1492,11 @@ MACHINE_START( buggyboy ) /* Initialise for each game */ prom = (UINT16*)memory_region(REGION_USER1) + (0x8000 >> 1); + /* set a timer to run the interrupts */ + interrupt_timer = timer_alloc(interrupt_callback, NULL); + /* /CUDISP CRTC interrupt */ - timer_set(video_screen_get_time_until_pos(machine->primary_screen, CURSOR_YPOS, CURSOR_XPOS), NULL, 0, interrupt_callback); + timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(machine->primary_screen, CURSOR_YPOS, CURSOR_XPOS), 0); } MACHINE_START( buggybjr ) @@ -1497,6 +1504,9 @@ MACHINE_START( buggybjr ) /* Initialise for each game */ prom = (UINT16*)memory_region(REGION_USER1) + (0x8000 >> 1); + /* set a timer to run the interrupts */ + interrupt_timer = timer_alloc(interrupt_callback, NULL); + /* /CUDISP CRTC interrupt */ - timer_set(video_screen_get_time_until_pos(machine->primary_screen, CURSOR_YPOS, CURSOR_XPOS), NULL, 0, interrupt_callback); + timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(machine->primary_screen, CURSOR_YPOS, CURSOR_XPOS), 0); } |