Commit a2b6937f authored by GnoStiC's avatar GnoStiC

puae 2.3.2

parent 6ccc562e
...@@ -111,7 +111,7 @@ noinst_HEADERS = \ ...@@ -111,7 +111,7 @@ noinst_HEADERS = \
include/dongle.h include/a2065.h \ include/dongle.h include/a2065.h \
include/gayle.h include/a2091.h include/ncr_scsi.h \ include/gayle.h include/a2091.h include/ncr_scsi.h \
include/drawing.h include/driveclick.h \ include/drawing.h include/driveclick.h \
include/enforcer.h include/ersatz.h \ include/enforcer.h \
include/events.h include/events_jit.h include/events_normal.h \ include/events.h include/events_jit.h include/events_normal.h \
include/execlib.h \ include/execlib.h \
include/fdi2raw.h include/filesys.h \ include/fdi2raw.h include/filesys.h \
...@@ -154,7 +154,7 @@ EXTRA_DIST = \ ...@@ -154,7 +154,7 @@ EXTRA_DIST = \
uae_SOURCES = \ uae_SOURCES = \
main.c newcpu.c memory.c rommgr.c custom.c serial.c dongle.c cia.c \ main.c newcpu.c memory.c rommgr.c custom.c serial.c dongle.c cia.c \
blitter.c autoconf.c traps.c ersatz.c keybuf.c expansion.c inputrecord.c \ blitter.c autoconf.c traps.c keybuf.c expansion.c inputrecord.c \
diskutil.c zfile.c zfile_archive.c cfgfile.c picasso96.c inputdevice.c \ diskutil.c zfile.c zfile_archive.c cfgfile.c picasso96.c inputdevice.c \
gfxutil.c audio.c sinctable.c statusline.c drawing.c consolehook.c \ gfxutil.c audio.c sinctable.c statusline.c drawing.c consolehook.c \
native2amiga.c disk.c crc32.c savestate.c arcadia.c cdtv.c cd32_fmv.c \ native2amiga.c disk.c crc32.c savestate.c arcadia.c cdtv.c cd32_fmv.c \
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -35,6 +35,9 @@ static int delayed[MAX_TOTAL_SCSI_DEVICES]; ...@@ -35,6 +35,9 @@ static int delayed[MAX_TOTAL_SCSI_DEVICES];
static uae_sem_t unitsem[MAX_TOTAL_SCSI_DEVICES]; static uae_sem_t unitsem[MAX_TOTAL_SCSI_DEVICES];
static int unitsem_cnt[MAX_TOTAL_SCSI_DEVICES]; static int unitsem_cnt[MAX_TOTAL_SCSI_DEVICES];
static int play_end_pos[MAX_TOTAL_SCSI_DEVICES];
static uae_u8 play_qcode[MAX_TOTAL_SCSI_DEVICES][SUBQ_SIZE];
static TCHAR newimagefiles[MAX_TOTAL_SCSI_DEVICES][256]; static TCHAR newimagefiles[MAX_TOTAL_SCSI_DEVICES][256];
static int imagechangetime[MAX_TOTAL_SCSI_DEVICES]; static int imagechangetime[MAX_TOTAL_SCSI_DEVICES];
static bool cdimagefileinuse[MAX_TOTAL_SCSI_DEVICES], wasopen[MAX_TOTAL_SCSI_DEVICES]; static bool cdimagefileinuse[MAX_TOTAL_SCSI_DEVICES], wasopen[MAX_TOTAL_SCSI_DEVICES];
...@@ -674,6 +677,7 @@ int sys_command_cd_play (int unitnum, int startlsn, int endlsn, int scan) ...@@ -674,6 +677,7 @@ int sys_command_cd_play (int unitnum, int startlsn, int endlsn, int scan)
return 0; return 0;
if (!getsem (unitnum)) if (!getsem (unitnum))
return 0; return 0;
play_end_pos[unitnum] = endlsn;
if (device_func[unitnum]->play == NULL) { if (device_func[unitnum]->play == NULL) {
uae_u8 cmd[12] = {0,0,0,0,0,0,0,0,0,0,0,0}; uae_u8 cmd[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
int startmsf = lsn2msf (startlsn); int startmsf = lsn2msf (startlsn);
...@@ -1812,6 +1816,7 @@ uae_u8 *save_cd (int num, int *len) ...@@ -1812,6 +1816,7 @@ uae_u8 *save_cd (int num, int *len)
unsigned int i; unsigned int i;
uae_u8 *dstbak, *dst; uae_u8 *dstbak, *dst;
memset(play_qcode[num], 0, SUBQ_SIZE);
if (!currprefs.cdslots[num].inuse || num >= MAX_TOTAL_SCSI_DEVICES) if (!currprefs.cdslots[num].inuse || num >= MAX_TOTAL_SCSI_DEVICES)
return NULL; return NULL;
#ifdef CD32 #ifdef CD32
...@@ -1819,10 +1824,15 @@ uae_u8 *save_cd (int num, int *len) ...@@ -1819,10 +1824,15 @@ uae_u8 *save_cd (int num, int *len)
return NULL; return NULL;
#endif #endif
dstbak = dst = xmalloc (uae_u8, 4 + 256 + 4 + 4); dstbak = dst = xmalloc (uae_u8, 4 + 256 + 4 + 4);
save_u32 (4); save_u32 (4 | 8);
save_path (currprefs.cdslots[num].name, SAVESTATE_PATH_CD); save_path (currprefs.cdslots[num].name, SAVESTATE_PATH_CD);
save_u32 (currprefs.cdslots[num].type); save_u32 (currprefs.cdslots[num].type);
save_u32 (0); save_u32 (0);
save_u32 (0);
sys_command_cd_qcode (num, play_qcode[num]);
for (i = 0; i < SUBQ_SIZE; i++)
save_u8 (play_qcode[num][i]);
save_u32 (play_end_pos[num]);
*len = dst - dstbak; *len = dst - dstbak;
return dstbak; return dstbak;
} }
...@@ -1834,6 +1844,8 @@ uae_u8 *restore_cd (int num, uae_u8 *src) ...@@ -1834,6 +1844,8 @@ uae_u8 *restore_cd (int num, uae_u8 *src)
if (num >= MAX_TOTAL_SCSI_DEVICES) if (num >= MAX_TOTAL_SCSI_DEVICES)
return NULL; return NULL;
unsigned int i;
flags = restore_u32 (); flags = restore_u32 ();
s = restore_path (SAVESTATE_PATH_CD); s = restore_path (SAVESTATE_PATH_CD);
int type = restore_u32 (); int type = restore_u32 ();
...@@ -1843,6 +1855,12 @@ uae_u8 *restore_cd (int num, uae_u8 *src) ...@@ -1843,6 +1855,12 @@ uae_u8 *restore_cd (int num, uae_u8 *src)
_tcscpy (currprefs.cdslots[num].name, s); _tcscpy (currprefs.cdslots[num].name, s);
changed_prefs.cdslots[num].type = currprefs.cdslots[num].type = type; changed_prefs.cdslots[num].type = currprefs.cdslots[num].type = type;
} }
if (flags & 8) {
restore_u32 ();
for (i = 0; i < SUBQ_SIZE; i++)
play_qcode[num][i] = restore_u8 ();
play_end_pos[num] = restore_u32 ();
}
return src; return src;
} }
......
...@@ -1248,7 +1248,7 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) ...@@ -1248,7 +1248,7 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
/* We special case the various path options here. */ /* We special case the various path options here. */
if (cfgfile_multipath (option, value, "rom_path", &p->path_rom) if (cfgfile_multipath (option, value, "rom_path", &p->path_rom)
|| cfgfile_multipath (option, value, "floppy_path", &p->path_floppy) || cfgfile_multipath (option, value, "floppy_path", &p->path_floppy)
|| cfgfile_multipath (option, value, "cd_path", &p->path_floppy) || cfgfile_multipath (option, value, "cd_path", &p->path_cd)
|| cfgfile_multipath (option, value, "hardfile_path", &p->path_hardfile)) || cfgfile_multipath (option, value, "hardfile_path", &p->path_hardfile))
return 1; return 1;
return target_parse_option (p, option, value); return target_parse_option (p, option, value);
......
...@@ -515,6 +515,9 @@ static void do_sprites (int currhp); ...@@ -515,6 +515,9 @@ static void do_sprites (int currhp);
static void remember_ctable (void) static void remember_ctable (void)
{ {
/* This can happen when program program crashes very badly */
if (next_color_entry >= COLOR_TABLE_SIZE)
return;
if (remembered_color_entry == -1) { if (remembered_color_entry == -1) {
/* The colors changed since we last recorded a color map. Record a /* The colors changed since we last recorded a color map. Record a
* new one. */ * new one. */
......
...@@ -711,7 +711,8 @@ static void genamode2 (amodes mode, char *reg, wordsizes size, char *name, int g ...@@ -711,7 +711,8 @@ static void genamode2 (amodes mode, char *reg, wordsizes size, char *name, int g
offset = m68k_pc_offset_last; offset = m68k_pc_offset_last;
} }
printf ("\tif (%sa & 1) {\n", name); printf ("\tif (%sa & 1) {\n", name);
incpc ("%d", offset); if (offset > 2)
incpc ("%d", offset - 2);
printf ("\t\texception3 (opcode, %sa);\n", name); printf ("\t\texception3 (opcode, %sa);\n", name);
printf ("\t\tgoto %s;\n", endlabelstr); printf ("\t\tgoto %s;\n", endlabelstr);
printf ("\t}\n"); printf ("\t}\n");
......
...@@ -149,6 +149,7 @@ extern uae_u8 *save_ide (int num, int *len, uae_u8*); ...@@ -149,6 +149,7 @@ extern uae_u8 *save_ide (int num, int *len, uae_u8*);
extern uae_u8 *save_cd (int num, int *len); extern uae_u8 *save_cd (int num, int *len);
extern uae_u8 *restore_cd (int, uae_u8 *src); extern uae_u8 *restore_cd (int, uae_u8 *src);
extern void restore_cd_finish (void);
extern uae_u8 *save_configuration (int *len); extern uae_u8 *save_configuration (int *len);
extern uae_u8 *restore_configuration (uae_u8 *src); extern uae_u8 *restore_configuration (uae_u8 *src);
......
...@@ -76,8 +76,6 @@ static void nocanbang (void) ...@@ -76,8 +76,6 @@ static void nocanbang (void)
canbang = 0; canbang = 0;
} }
bool ersatzkickfile;
uae_u32 allocated_chipmem; uae_u32 allocated_chipmem;
uae_u32 allocated_fastmem; uae_u32 allocated_fastmem;
uae_u32 allocated_bogomem; uae_u32 allocated_bogomem;
...@@ -2464,9 +2462,8 @@ void memory_reset (void) ...@@ -2464,9 +2462,8 @@ void memory_reset (void)
if (_tcscmp (currprefs.romfile, changed_prefs.romfile) != 0 if (_tcscmp (currprefs.romfile, changed_prefs.romfile) != 0
|| _tcscmp (currprefs.romextfile, changed_prefs.romextfile) != 0) || _tcscmp (currprefs.romextfile, changed_prefs.romextfile) != 0)
{ {
write_log ("ROM loader..\n"); write_log ("ROM loader.. (%s)\n", currprefs.romfile);
kickstart_rom = 1; kickstart_rom = 1;
ersatzkickfile = 0;
a1000_handle_kickstart (0); a1000_handle_kickstart (0);
xfree (a1000_bootrom); xfree (a1000_bootrom);
a1000_bootrom = 0; a1000_bootrom = 0;
......
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