Commit bb1b7971 authored by gnostic's avatar gnostic

puae 2.3.1

parent 358777a3
...@@ -1284,8 +1284,10 @@ static void do_blitter2 (int hpos, int copper) ...@@ -1284,8 +1284,10 @@ static void do_blitter2 (int hpos, int copper)
#ifdef BLITTER_DEBUG_NOWAIT #ifdef BLITTER_DEBUG_NOWAIT
if (bltstate != BLT_done) { if (bltstate != BLT_done) {
if (blit_final) if (blit_final) {
write_log ("blitter was already active! PC=%08x\n", M68K_GETPC); write_log ("blitter was already active! PC=%08x\n", M68K_GETPC);
//activate_debugger();
}
} }
#endif #endif
cleanstart = 0; cleanstart = 0;
......
...@@ -190,8 +190,8 @@ static const TCHAR *maxhoriz[] = { "lores", "hires", "superhires", 0 }; ...@@ -190,8 +190,8 @@ static const TCHAR *maxhoriz[] = { "lores", "hires", "superhires", 0 };
static const TCHAR *maxvert[] = { "nointerlace", "interlace", 0 }; static const TCHAR *maxvert[] = { "nointerlace", "interlace", 0 };
static const TCHAR *abspointers[] = { "none", "mousehack", "tablet", 0 }; static const TCHAR *abspointers[] = { "none", "mousehack", "tablet", 0 };
static const TCHAR *magiccursors[] = { "both", "native", "host", 0 }; static const TCHAR *magiccursors[] = { "both", "native", "host", 0 };
static const TCHAR *autoscale[] = { "none", "scale", "resize", 0 }; static const TCHAR *autoscale[] = { "none", "auto", "standard", "max", "scale", "resize", "center", 0 };
static const TCHAR *joyportmodes[] = { NULL, "mouse", "djoy", "ajoy", "cdtvjoy", "cd32joy", "lightpen", 0 }; static const TCHAR *joyportmodes[] = { "", "mouse", "djoy", "gamepad", "ajoy", "cdtvjoy", "cd32joy", "lightpen", 0 };
static const TCHAR *joyaf[] = { "none", "normal", "toggle", 0 }; static const TCHAR *joyaf[] = { "none", "normal", "toggle", 0 };
static const TCHAR *epsonprinter[] = { "none", "ascii", "epson_matrix_9pin", "epson_matrix_24pin", "epson_matrix_48pin", 0 }; static const TCHAR *epsonprinter[] = { "none", "ascii", "epson_matrix_9pin", "epson_matrix_24pin", "epson_matrix_48pin", 0 };
static const TCHAR *aspects[] = { "none", "vga", "tv", 0 }; static const TCHAR *aspects[] = { "none", "vga", "tv", 0 };
...@@ -726,6 +726,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) ...@@ -726,6 +726,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
cfgfile_dwrite_bool (f, "magic_mouse", p->input_magic_mouse); cfgfile_dwrite_bool (f, "magic_mouse", p->input_magic_mouse);
cfgfile_dwrite_str (f, "magic_mousecursor", magiccursors[p->input_magic_mouse_cursor]); cfgfile_dwrite_str (f, "magic_mousecursor", magiccursors[p->input_magic_mouse_cursor]);
cfgfile_dwrite_str (f, "absolute_mouse", abspointers[p->input_tablet]); cfgfile_dwrite_str (f, "absolute_mouse", abspointers[p->input_tablet]);
cfgfile_dwrite_bool (f, "clipboard_sharing", p->clipboard_sharing);
cfgfile_write (f, "gfx_display", "%d", p->gfx_display); cfgfile_write (f, "gfx_display", "%d", p->gfx_display);
cfgfile_write_str (f, "gfx_display_name", p->gfx_display_name); cfgfile_write_str (f, "gfx_display_name", p->gfx_display_name);
...@@ -740,6 +741,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) ...@@ -740,6 +741,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
cfgfile_write (f, "gfx_height_fullscreen", "%d", p->gfx_size_fs.height); cfgfile_write (f, "gfx_height_fullscreen", "%d", p->gfx_size_fs.height);
cfgfile_write (f, "gfx_refreshrate", "%d", p->gfx_refreshrate); cfgfile_write (f, "gfx_refreshrate", "%d", p->gfx_refreshrate);
cfgfile_write_bool (f, "gfx_autoresolution", p->gfx_autoresolution); cfgfile_write_bool (f, "gfx_autoresolution", p->gfx_autoresolution);
cfgfile_write (f, "gfx_backbuffers", "%d", p->gfx_backbuffers);
cfgfile_write_str (f, "gfx_vsync", vsyncmodes[p->gfx_avsync]); cfgfile_write_str (f, "gfx_vsync", vsyncmodes[p->gfx_avsync]);
cfgfile_write_str (f, "gfx_vsync_picasso", vsyncmodes[p->gfx_pvsync]); cfgfile_write_str (f, "gfx_vsync_picasso", vsyncmodes[p->gfx_pvsync]);
cfgfile_write_bool (f, "gfx_lores", p->gfx_resolution == 0); cfgfile_write_bool (f, "gfx_lores", p->gfx_resolution == 0);
...@@ -920,9 +922,9 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) ...@@ -920,9 +922,9 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
: "FOO")); : "FOO"));
#ifdef SAVESTATE #ifdef SAVESTATE
cfgfile_dwrite_str (f, "state_replay", p->statecapture ? "yes" : "no");
cfgfile_dwrite (f, "state_replay_rate", "%d", p->statecapturerate); cfgfile_dwrite (f, "state_replay_rate", "%d", p->statecapturerate);
cfgfile_dwrite (f, "state_replay_buffer", "%d", p->statecapturebuffersize); cfgfile_dwrite (f, "state_replay_buffers", "%d", p->statecapturebuffersize);
cfgfile_dwrite_bool (f, "state_replay_autoplay", p->inprec_autoplay);
#endif #endif
cfgfile_dwrite_bool (f, "warp", p->turbo_emulation); cfgfile_dwrite_bool (f, "warp", p->turbo_emulation);
...@@ -1309,7 +1311,8 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) ...@@ -1309,7 +1311,8 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
if (cfgfile_intval (option, value, "sound_latency", &p->sound_latency, 1) if (cfgfile_intval (option, value, "sound_latency", &p->sound_latency, 1)
|| cfgfile_intval (option, value, "sound_max_buff", &p->sound_maxbsiz, 1) || cfgfile_intval (option, value, "sound_max_buff", &p->sound_maxbsiz, 1)
|| cfgfile_intval (option, value, "state_replay_rate", &p->statecapturerate, 1) || cfgfile_intval (option, value, "state_replay_rate", &p->statecapturerate, 1)
|| cfgfile_intval (option, value, "state_replay_buffer", &p->statecapturebuffersize, 1) || cfgfile_intval (option, value, "state_replay_buffers", &p->statecapturebuffersize, 1)
|| cfgfile_yesno (option, value, "state_replay_autoplay", &p->inprec_autoplay)
|| cfgfile_intval (option, value, "sound_frequency", &p->sound_freq, 1) || cfgfile_intval (option, value, "sound_frequency", &p->sound_freq, 1)
|| cfgfile_intval (option, value, "sound_volume", &p->sound_volume, 1) || cfgfile_intval (option, value, "sound_volume", &p->sound_volume, 1)
|| cfgfile_intval (option, value, "sound_stereo_separation", &p->sound_stereo_separation, 1) || cfgfile_intval (option, value, "sound_stereo_separation", &p->sound_stereo_separation, 1)
...@@ -1381,17 +1384,16 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) ...@@ -1381,17 +1384,16 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
|| cfgfile_yesno (option, value, "sound_auto", &p->sound_auto) || cfgfile_yesno (option, value, "sound_auto", &p->sound_auto)
|| cfgfile_yesno (option, value, "sound_stereo_swap_paula", &p->sound_stereo_swap_paula) || cfgfile_yesno (option, value, "sound_stereo_swap_paula", &p->sound_stereo_swap_paula)
|| cfgfile_yesno (option, value, "sound_stereo_swap_ahi", &p->sound_stereo_swap_ahi) || cfgfile_yesno (option, value, "sound_stereo_swap_ahi", &p->sound_stereo_swap_ahi)
|| cfgfile_yesno (option, value, "state_replay", &p->statecapture)
|| cfgfile_yesno (option, value, "avoid_cmov", &p->avoid_cmov) || cfgfile_yesno (option, value, "avoid_cmov", &p->avoid_cmov)
|| cfgfile_yesno (option, value, "log_illegal_mem", &p->illegal_mem) || cfgfile_yesno (option, value, "log_illegal_mem", &p->illegal_mem)
|| cfgfile_yesno (option, value, "filesys_no_fsdb", &p->filesys_no_uaefsdb) || cfgfile_yesno (option, value, "filesys_no_fsdb", &p->filesys_no_uaefsdb)
|| cfgfile_yesno (option, value, "gfx_vsync_picasso", &p->gfx_pvsync)
|| cfgfile_yesno (option, value, "gfx_blacker_than_black", &p->gfx_blackerthanblack) || cfgfile_yesno (option, value, "gfx_blacker_than_black", &p->gfx_blackerthanblack)
|| cfgfile_yesno (option, value, "gfx_flickerfixer", &p->gfx_scandoubler) || cfgfile_yesno (option, value, "gfx_flickerfixer", &p->gfx_scandoubler)
|| cfgfile_yesno (option, value, "synchronize_clock", &p->tod_hack) || cfgfile_yesno (option, value, "synchronize_clock", &p->tod_hack)
|| cfgfile_yesno (option, value, "magic_mouse", &p->input_magic_mouse) || cfgfile_yesno (option, value, "magic_mouse", &p->input_magic_mouse)
|| cfgfile_yesno (option, value, "warp", &p->turbo_emulation) || cfgfile_yesno (option, value, "warp", &p->turbo_emulation)
|| cfgfile_yesno (option, value, "headless", &p->headless) || cfgfile_yesno (option, value, "headless", &p->headless)
|| cfgfile_yesno (option, value, "clipboard_sharing", &p->clipboard_sharing)
|| cfgfile_yesno (option, value, "bsdsocket_emu", &p->socket_emu)) || cfgfile_yesno (option, value, "bsdsocket_emu", &p->socket_emu))
return 1; return 1;
...@@ -3680,6 +3682,7 @@ void default_prefs (struct uae_prefs *p, int type) ...@@ -3680,6 +3682,7 @@ void default_prefs (struct uae_prefs *p, int type)
p->picasso96_nocustom = 1; p->picasso96_nocustom = 1;
p->cart_internal = 1; p->cart_internal = 1;
p->sana2 = 0; p->sana2 = 0;
p->clipboard_sharing = true;
p->cs_compatible = 1; p->cs_compatible = 1;
p->cs_rtc = 2; p->cs_rtc = 2;
...@@ -3708,13 +3711,13 @@ void default_prefs (struct uae_prefs *p, int type) ...@@ -3708,13 +3711,13 @@ void default_prefs (struct uae_prefs *p, int type)
p->gfx_filter = 0; p->gfx_filter = 0;
p->gfx_filtershader[0] = 0; p->gfx_filtershader[0] = 0;
p->gfx_filtermask[0] = 0; p->gfx_filtermask[0] = 0;
p->gfx_filter_horiz_zoom_mult = 0; p->gfx_filter_horiz_zoom_mult = 1000;
p->gfx_filter_vert_zoom_mult = 0; p->gfx_filter_vert_zoom_mult = 1000;
p->gfx_filter_bilinear = 0; p->gfx_filter_bilinear = 0;
p->gfx_filter_filtermode = 0; p->gfx_filter_filtermode = 0;
p->gfx_filter_scanlineratio = (1 << 4) | 1; p->gfx_filter_scanlineratio = (1 << 4) | 1;
p->gfx_filter_keep_aspect = 0; p->gfx_filter_keep_aspect = 0;
p->gfx_filter_autoscale = 0; p->gfx_filter_autoscale = AUTOSCALE_STATIC_AUTO;
p->gfx_filteroverlay_overscan = 0; p->gfx_filteroverlay_overscan = 0;
#endif #endif
...@@ -3782,9 +3785,9 @@ void default_prefs (struct uae_prefs *p, int type) ...@@ -3782,9 +3785,9 @@ void default_prefs (struct uae_prefs *p, int type)
#endif #endif
#ifdef SAVESTATE #ifdef SAVESTATE
p->statecapturebuffersize = 20 * 1024 * 1024; p->statecapturebuffersize = 100;
p->statecapturerate = 5 * 50; p->statecapturerate = 5 * 50;
p->statecapture = 0; p->inprec_autoplay = true;
#endif #endif
#ifdef UAE_MINI #ifdef UAE_MINI
......
...@@ -70,6 +70,14 @@ bootcode: ...@@ -70,6 +70,14 @@ bootcode:
residenthack residenthack
movem.l d0-d2/a0-a2/a6,-(sp) movem.l d0-d2/a0-a2/a6,-(sp)
move.w #$FF38,d0
moveq #17,d1
bsr.w getrtbase
jsr (a0)
tst.l d0
beq.s .rsh
move.l 4.w,a6 move.l 4.w,a6
cmp.w #37,20(a6) cmp.w #37,20(a6)
bcs.s .rsh bcs.s .rsh
...@@ -347,8 +355,8 @@ EXTS_loop: ...@@ -347,8 +355,8 @@ EXTS_loop:
jsr -366(a6) ; PutMsg jsr -366(a6) ; PutMsg
bra.b EXTS_loop bra.b EXTS_loop
EXTS_signal_reply: EXTS_signal_reply:
cmp.w #2,d0 cmp.w #2,d0
bgt.b EXTS_reply bgt.b EXTS_reply
move.l d1,d0 move.l d1,d0
jsr -$144(a6) ; Signal jsr -$144(a6) ; Signal
bra.b EXTS_loop bra.b EXTS_loop
...@@ -1226,15 +1234,15 @@ FSML_loop: ...@@ -1226,15 +1234,15 @@ FSML_loop:
clr.b 172(a3) clr.b 172(a3)
.nodc .nodc
move.l a4,d0 move.l a4,d0
beq.s FSML_loop beq.s nonnotif
; notify reply? ; notify reply?
cmp.w #38, 18(a4) cmp.w #38, 18(a4)
bne.s nonotif bne.s nonnotif
cmp.l #NOTIFY_CLASS, 20(a4) cmp.l #NOTIFY_CLASS, 20(a4)
bne.s nonotif bne.s nonnotif
cmp.w #NOTIFY_CODE, 24(a4) cmp.w #NOTIFY_CODE, 24(a4)
bne.s nonotif bne.s nonnotif
move.l 26(a4),a0 ; NotifyRequest move.l 26(a4),a0 ; NotifyRequest
move.l 12(a0),d0 ; flags move.l 12(a0),d0 ; flags
and.l #NRF_WAIT_REPLY|NRF_MAGIC,d0 and.l #NRF_WAIT_REPLY|NRF_MAGIC,d0
...@@ -1252,15 +1260,20 @@ nonoti ...@@ -1252,15 +1260,20 @@ nonoti
jsr FreeMem(a6) jsr FreeMem(a6)
bra.w FSML_loop bra.w FSML_loop
nonotif nonnotif
moveq #-2,d2 ; lock timeout "done" value
move.l a4,d0
beq.s FSML_check_queue_other
move.l 10(a4),d3 ; ln_Name move.l 10(a4),d3 ; ln_Name
bne.b FSML_FromDOS bne.b FSML_FromDOS
moveq #-1,d2 ; normal "done" value
; It's a dummy packet indicating that some queued command finished. ; It's a dummy packet indicating that some queued command finished.
move.w #$FF50,d0 ; exter_int_helper move.w #$FF50,d0 ; exter_int_helper
bsr.w getrtbase bsr.w getrtbase
moveq.l #1,d0 moveq.l #1,d0
jsr (a0) jsr (a0)
FSML_check_queue_other:
; Go through the queue and reply all those that finished. ; Go through the queue and reply all those that finished.
lea.l 4(a3),a2 lea.l 4(a3),a2
move.l (a2),a0 move.l (a2),a0
...@@ -1272,7 +1285,8 @@ FSML_check_old: ...@@ -1272,7 +1285,8 @@ FSML_check_old:
; This field may be accessed concurrently by several UAE threads. ; This field may be accessed concurrently by several UAE threads.
; This _should_ be harmless on all reasonable machines. ; This _should_ be harmless on all reasonable machines.
move.l 4(a0),d0 move.l 4(a0),d0
bpl.b FSML_check_next cmp.l d0,d2
bne.b FSML_check_next
movem.l a0/a1,-(a7) movem.l a0/a1,-(a7)
move.l 10(a0),a4 move.l 10(a0),a4
bsr.b ReplyOne bsr.b ReplyOne
...@@ -2061,6 +2075,14 @@ CLIP_END = (CLIP_POINTER_PREFS+32) ...@@ -2061,6 +2075,14 @@ CLIP_END = (CLIP_POINTER_PREFS+32)
clipboard_init: clipboard_init:
movem.l a5/a6,-(sp) movem.l a5/a6,-(sp)
move.w #$FF38,d0
moveq #17,d1
bsr.w getrtbase
jsr (a0)
btst #0,d0
beq.s .noclip
move.l 4.w,a6 move.l 4.w,a6
move.l #CLIP_END,d0 move.l #CLIP_END,d0
move.l #$10001,d1 move.l #$10001,d1
...@@ -2082,7 +2104,7 @@ clipboard_init: ...@@ -2082,7 +2104,7 @@ clipboard_init:
moveq #-10,d0 moveq #-10,d0
move.l #10000,d1 move.l #10000,d1
bsr.w createproc bsr.w createproc
.noclip
moveq #0,d0 moveq #0,d0
movem.l (sp)+,a5/a6 movem.l (sp)+,a5/a6
rts rts
...@@ -2413,13 +2435,15 @@ cliphook: ...@@ -2413,13 +2435,15 @@ cliphook:
consolehook: consolehook:
move.l 4.w,a6 move.l 4.w,a6
moveq #-1,d2 moveq #-1,d2
move.w #$FF38,d0 move.w #$FF38,d0
moveq #100,d1 moveq #17,d1
bsr.w getrtbase bsr.w getrtbase
jsr (a0) jsr (a0)
tst.l d0 btst #1,d0
beq.s .ch2 beq.s .ch2
moveq #0,d2 moveq #0,d2
jsr -$0084(a6) ;Forbid jsr -$0084(a6) ;Forbid
lea 350(a6),a0 ;DeviceList lea 350(a6),a0 ;DeviceList
......
This diff is collapsed.
...@@ -371,7 +371,7 @@ static uae_u32 vhd_checksum (uae_u8 *p, int offset) ...@@ -371,7 +371,7 @@ static uae_u32 vhd_checksum (uae_u8 *p, int offset)
return ~sum; return ~sum;
} }
static int hdf_open2 (struct hardfiledata *hfd, const TCHAR *pname) int hdf_open (struct hardfiledata *hfd, const TCHAR *pname)
{ {
uae_u8 tmp[512], tmp2[512]; uae_u8 tmp[512], tmp2[512];
uae_u32 v; uae_u32 v;
...@@ -439,25 +439,6 @@ end: ...@@ -439,25 +439,6 @@ end:
return 0; return 0;
} }
int hdf_open (struct hardfiledata *hfd, const TCHAR *pname)
{
int v;
uae_u8 buf[512];
v = hdf_open2 (hfd, pname);
if (!v)
return v;
memset (buf, 0, sizeof buf);
hdf_read (hfd, buf, 0, sizeof buf);
if (buf[0] == 0x39 && buf[1] == 0x10 && buf[2] == 0xd3 && buf[3] == 0x12) { // AdIDE encoded "CPRM"
hfd->adide = 1;
}
if (!memcmp (buf, "DRKS", 4)) {
hfd->byteswap = 1;
}
return v;
}
void hdf_close (struct hardfiledata *hfd) void hdf_close (struct hardfiledata *hfd)
{ {
hdf_close_target (hfd); hdf_close_target (hfd);
...@@ -888,6 +869,28 @@ static void hdf_byteswap (void *v, int len) ...@@ -888,6 +869,28 @@ static void hdf_byteswap (void *v, int len)
} }
} }
int hdf_read_rdb (struct hardfiledata *hfd, void *buffer, uae_u64 offset, int len)
{
int v;
v = hdf_read (hfd, buffer, offset, len);
if (v > 0 && offset < 16 * 512 && !hfd->byteswap && !hfd->adide) {
uae_u8 *buf = (uae_u8*)buffer;
bool changed = false;
if (buf[0] == 0x39 && buf[1] == 0x10 && buf[2] == 0xd3 && buf[3] == 0x12) { // AdIDE encoded "CPRM"
hfd->adide = 1;
changed = true;
write_log ("HDF: adide scrambling detected\n");
} else if (!memcmp (buf, "DRKS", 4)) {
hfd->byteswap = 1;
changed = true;
write_log ("HDF: byteswapped RDB detected\n");
}
if (changed)
v = hdf_read (hfd, buffer, offset, len);
}
return v;
}
int hdf_read (struct hardfiledata *hfd, void *buffer, uae_u64 offset, int len) int hdf_read (struct hardfiledata *hfd, void *buffer, uae_u64 offset, int len)
{ {
int v; int v;
......
...@@ -99,6 +99,7 @@ extern struct hardfiledata *get_hardfile_data (int nr); ...@@ -99,6 +99,7 @@ extern struct hardfiledata *get_hardfile_data (int nr);
extern int hdf_open (struct hardfiledata *hfd, const TCHAR *name); extern int hdf_open (struct hardfiledata *hfd, const TCHAR *name);
extern int hdf_dup (struct hardfiledata *dhfd, const struct hardfiledata *shfd); extern int hdf_dup (struct hardfiledata *dhfd, const struct hardfiledata *shfd);
extern void hdf_close (struct hardfiledata *hfd); extern void hdf_close (struct hardfiledata *hfd);
extern int hdf_read_rdb (struct hardfiledata *hfd, void *buffer, uae_u64 offset, int len);
extern int hdf_read (struct hardfiledata *hfd, void *buffer, uae_u64 offset, int len); extern int hdf_read (struct hardfiledata *hfd, void *buffer, uae_u64 offset, int len);
extern int hdf_write (struct hardfiledata *hfd, void *buffer, uae_u64 offset, int len); extern int hdf_write (struct hardfiledata *hfd, void *buffer, uae_u64 offset, int len);
extern int hdf_getnumharddrives (void); extern int hdf_getnumharddrives (void);
......
...@@ -773,7 +773,7 @@ void inprec_playtorecord (void) ...@@ -773,7 +773,7 @@ void inprec_playtorecord (void)
} }
zfile_fwrite (inprec_buffer + header_end2, inprec_size - header_end2, 1, inprec_zf); zfile_fwrite (inprec_buffer + header_end2, inprec_size - header_end2, 1, inprec_zf);
inprec_realtime (false); inprec_realtime (false);
// savestate_capture_request (); savestate_capture_request ();
} }
void inprec_setposition (int offset, int replaycounter) void inprec_setposition (int offset, int replaycounter)
......
...@@ -3866,8 +3866,10 @@ static void m68k_run_2p (void) ...@@ -3866,8 +3866,10 @@ static void m68k_run_2p (void)
prefetch_pc = m68k_getpc (); prefetch_pc = m68k_getpc ();
prefetch = x_get_long (prefetch_pc); prefetch = x_get_long (prefetch_pc);
for (;;) { for (;;) {
uae_u16 opcode;
uae_u32 pc = m68k_getpc (); uae_u32 pc = m68k_getpc ();
uae_u16 opcode;
r->instruction_pc = pc;
#if DEBUG_CD32CDTVIO #if DEBUG_CD32CDTVIO
out_cd32io (m68k_getpc ()); out_cd32io (m68k_getpc ());
...@@ -3877,19 +3879,16 @@ static void m68k_run_2p (void) ...@@ -3877,19 +3879,16 @@ static void m68k_run_2p (void)
if (pc == prefetch_pc) { if (pc == prefetch_pc) {
opcode = prefetch >> 16; opcode = prefetch >> 16;
regs.instruction_pc = pc;
} else if (pc == prefetch_pc + 2) { } else if (pc == prefetch_pc + 2) {
regs.instruction_pc = pc + 2;
opcode = prefetch; opcode = prefetch;
} else { } else {
regs.instruction_pc = pc;
opcode = x_get_word (pc); opcode = x_get_word (pc);
prefetch_pc = pc + 2;
prefetch = x_get_long (prefetch_pc);
} }
count_instr (opcode); count_instr (opcode);
prefetch_pc = m68k_getpc () + 2;
prefetch = x_get_long (prefetch_pc);
cpu_cycles = (*cpufunctbl[opcode])(opcode); cpu_cycles = (*cpufunctbl[opcode])(opcode);
cpu_cycles &= cycles_mask; cpu_cycles &= cycles_mask;
cpu_cycles |= cycles_val; cpu_cycles |= cycles_val;
...@@ -4986,6 +4985,7 @@ static void exception3f (uae_u32 opcode, uaecptr addr, int writeaccess, int inst ...@@ -4986,6 +4985,7 @@ static void exception3f (uae_u32 opcode, uaecptr addr, int writeaccess, int inst
last_writeaccess_for_exception_3 = writeaccess; last_writeaccess_for_exception_3 = writeaccess;
last_instructionaccess_for_exception_3 = instructionaccess; last_instructionaccess_for_exception_3 = instructionaccess;
Exception (3); Exception (3);
//activate_debugger();
} }
void exception3 (uae_u32 opcode, uaecptr addr) void exception3 (uae_u32 opcode, uaecptr addr)
......
...@@ -271,7 +271,7 @@ static uae_u32 emulib_GetDisk (uae_u32 drive, uaecptr name) ...@@ -271,7 +271,7 @@ static uae_u32 emulib_GetDisk (uae_u32 drive, uaecptr name)
if (drive > 3) if (drive > 3)
return 0; return 0;
for (i = 0;i < 256; i++) { for (i = 0; i < 256; i++) {
put_byte (name + i, currprefs.floppyslots[drive].df[i]); put_byte (name + i, currprefs.floppyslots[drive].df[i]);
} }
return 1; return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment