From: Toni Wilen Date: Sat, 23 Jul 2022 18:35:48 +0000 (+0300) Subject: Added American Laser Games Quickstart entry. X-Git-Tag: 41000~188 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=d8084fe27219602c859e1ab1ead9b3c4aac2e12e;p=francis%2Fwinuae.git Added American Laser Games Quickstart entry. --- diff --git a/arcadia.cpp b/arcadia.cpp index c72d6671..486cce0c 100644 --- a/arcadia.cpp +++ b/arcadia.cpp @@ -548,25 +548,25 @@ uae_u8 arcadia_parport (int port, uae_u8 pra, uae_u8 dra) return v; } -struct romdata *scan_arcadia_rom (TCHAR *path, int cnt) +struct romdata *scan_arcadia_rom(TCHAR *path, int cnt) { struct romdata *rd = 0; struct romlist **arc_rl; struct arcadiarom *arcadia_rom; int i; - arcadia_rom = is_arcadia (path, cnt); + arcadia_rom = is_arcadia(path, cnt); if (arcadia_rom) { - arc_rl = getarcadiaroms(); + arc_rl = getarcadiaroms(0); for (i = 0; arc_rl[i]; i++) { if (arc_rl[i]->rd->id == arcadia_rom->romid) { rd = arc_rl[i]->rd; - _tcscat (path, FSDB_DIR_SEPARATOR_S); - _tcscat (path, arcadia_rom->romid1); + _tcscat(path, FSDB_DIR_SEPARATOR_S); + _tcscat(path, arcadia_rom->romid1); break; } } - xfree (arc_rl); + xfree(arc_rl); } return rd; } diff --git a/cfgfile.cpp b/cfgfile.cpp index 8b276400..1ae8b314 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -8366,6 +8366,10 @@ static void buildin_default_prefs (struct uae_prefs *p) _tcscpy (p->romextfile, _T("")); _tcscpy (p->romextfile2, _T("")); + p->genlock = 0; + p->genlock_image = 0; + p->genlock_image_file[0] = 0; + p->ne2000pciname[0] = 0; p->ne2000pcmcianame[0] = 0; p->a2065name[0] = 0; @@ -8724,6 +8728,8 @@ static int bip_cd32 (struct uae_prefs *p, int config, int compa, int romcheck) return 0; } else if (config > 1) { addbcromtype(p, ROMTYPE_CUBO, true, NULL, 0); + fetch_datapath(p->flashfile, sizeof(p->flashfile) / sizeof(TCHAR)); + _tcscat(p->flashfile, _T("cd32cubo.nvr")); } return 1; } @@ -8953,7 +8959,7 @@ static int bip_arcadia (struct uae_prefs *p, int config, int compa, int romcheck roms[2] = -1; if (!configure_rom (p, roms, romcheck)) return 0; - rl = getarcadiaroms (); + rl = getarcadiaroms(0); for (i = 0; rl[i]; i++) { if (config-- == 0) { roms[0] = rl[i]->rd->id; @@ -8966,6 +8972,42 @@ static int bip_arcadia (struct uae_prefs *p, int config, int compa, int romcheck return 1; } +static int bip_alg(struct uae_prefs* p, int config, int compa, int romcheck) +{ + int roms[4], i; + struct romlist** rl; + + p->bogomem.size = 0; + p->chipset_mask = 0; + p->cs_rtc = 0; + p->nr_floppies = 0; + p->genlock = 1; + p->genlock_image = 6; + p->floppyslots[0].dfxtype = DRV_NONE; + p->floppyslots[1].dfxtype = DRV_NONE; + set_68000_compa(p, compa); + p->cs_compatible = CP_A500; + built_in_chipset_prefs(p); + fetch_datapath(p->flashfile, sizeof(p->flashfile) / sizeof(TCHAR)); + _tcscat(p->flashfile, _T("alg.nvr")); + roms[0] = 5; + roms[1] = 4; + roms[2] = -1; + if (!configure_rom(p, roms, romcheck)) + return 0; + rl = getarcadiaroms(1); + for (i = 0; rl[i]; i++) { + if (config-- == 0) { + roms[0] = rl[i]->rd->id; + roms[1] = -1; + configure_rom(p, roms, 0); + break; + } + } + xfree(rl); + return 1; +} + static int bip_casablanca(struct uae_prefs *p, int config, int compa, int romcheck) { int roms[8]; @@ -9039,12 +9081,15 @@ int built_in_prefs (struct uae_prefs *p, int model, int config, int compa, int r v = bip_cdtv (p, config, compa, romcheck); break; case 10: - v = bip_arcadia(p, config, compa, romcheck); + v = bip_alg(p, config, compa, romcheck); break; case 11: - v = bip_casablanca(p, config, compa, romcheck); + v = bip_arcadia(p, config, compa, romcheck); break; case 12: + v = bip_casablanca(p, config, compa, romcheck); + break; + case 13: v = bip_super (p, config, compa, romcheck); break; } diff --git a/include/rommgr.h b/include/rommgr.h index 8b77ed96..58301a88 100644 --- a/include/rommgr.h +++ b/include/rommgr.h @@ -259,7 +259,7 @@ extern struct romdata *getromdatabytype (int romtype); extern struct romdata *getromdatabyidgroup (int id, int group, int subitem); extern struct romdata *getromdatabyzfile (struct zfile *f); extern struct romdata *getfrombydefaultname(const TCHAR *name, int size); -extern struct romlist **getarcadiaroms (void); +extern struct romlist **getarcadiaroms(int); extern struct romdata *getarcadiarombyname (const TCHAR *name); extern struct romlist **getromlistbyident (int ver, int rev, int subver, int subrev, const TCHAR *model, int romflags, bool all); extern void getromname (const struct romdata*, TCHAR*); diff --git a/od-win32/resources/resource.h b/od-win32/resources/resource.h index 4ff6db7e..61cb4538 100644 --- a/od-win32/resources/resource.h +++ b/od-win32/resources/resource.h @@ -428,6 +428,7 @@ #define IDS_QS_MODEL_A4000 1011 #define IDS_QS_MODEL_A4000T 1012 #define IDS_QS_MODEL_MACROSYSTEM 1013 +#define IDS_QS_MODEL_ALG 1014 #define IDC_RESOLUTION 1021 #define IDC_SERIAL 1022 #define IDC_REFRESHRATE 1022 diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index 241014bf..39d19796 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -2052,7 +2052,7 @@ END STRINGTABLE BEGIN - IDS_QS_MODELS "A500\nA500+\nA600\nA1000\nA1200\nA3000\nA4000\nCD32\nCDTV\nArcadia Multi Select system\nMacrosystem Casablanca/DraCo\nExpanded WinUAE example configuration\n" + IDS_QS_MODELS "A500\nA500+\nA600\nA1000\nA1200\nA3000\nA4000\nCD32\nCDTV\nAmerican Laser Games\nArcadia Multi Select system\nMacrosystem Casablanca/DraCo\nExpanded WinUAE example configuration\n" IDS_QS_MODEL_A500 "1.3 ROM, OCS, 512 KB Chip + 512 KB Slow RAM (most common)\nThis configuration is capable of running most games and demos produced for first-generation hardware. Only few exceptions need a different configuration (e.g. the oldest games tend to be incompatible with this configuration).\n1.3 ROM, ECS Agnus, 512 KB Chip RAM + 512 KB Slow RAM\nLater hardware revision of the A500. Nearly 100% compatible with the previous configuration.\n1.3 ROM, ECS Agnus, 1 MB Chip RAM\nFew newer games and demos require this configuration.\n1.3 ROM, OCS Agnus, 512 KB Chip RAM\nVery old (e.g. pre-1988) games and demos may require this configuration.\n1.2 ROM, OCS Agnus, 512 KB Chip RAM\nAs available for the A1000, and installed on the first A500 and A2000 series. Some very old programs only work correctly with this configuration. Note: This system ROM version can only boot from floppy disk (no hard disk boot support).\n1.2 ROM, OCS Agnus, 512 KB Chip RAM + 512 KB Slow RAM\nThis configuration adds expansion memory to the first A500 produced. Try this if your game does not work with newer configurations, but works with the previous one. It could add some features to the game, including faster loading times. Note: This system ROM version can only boot from floppy disk (no hard disk boot support)." IDS_QS_MODEL_A500P "Basic non-expanded configuration\nThe A500+ adds an ECS Agnus chip, 1 MB of Chip RAM and a 2.0 ROM to the A500. Many A500 games and demos don't work properly on an A500+.\n2 MB Chip RAM expanded configuration\n\n4 MB Fast RAM expanded configuration\n" IDS_QS_MODEL_A600 "Basic non-expanded configuration\nThe A600 is smaller than the A500+ and has an updated 2.0 ROM.\n2 MB Chip RAM expanded configuration\n\n4 MB Fast RAM expanded configuration\n" @@ -2066,6 +2066,7 @@ STRINGTABLE BEGIN IDS_QS_MODEL_UAE "High-end expanded configuration" IDS_QS_MODEL_ARCADIA "Arcadia\nArcadia Multi Select system is arcade platform developed by Arcadia and Mastertronic. It is based on an A500 mainboard with ROM cage attached to expansion port. Arcadia ROM files go to ""Cartridge ROM File"" in ROM-panel." + IDS_QS_MODEL_ALG "American Laser Games\n" IDS_QS_MODEL_A3000 "1.4 ROM, 2MB Chip + 8MB Fast\n\n2.04 ROM, 2MB Chip + 8MB Fast\n\n3.1 ROM, 2MB Chip + 8MB Fast\n" IDS_QS_MODEL_A4000 "68030, 3.1 ROM, 2MB Chip + 8MB Fast\n\n68040, 3.1 ROM, 2MB Chip + 8MB Fast\n\nCyberStorm PPC\n" IDS_QS_MODEL_A4000T "A4000T (test)\nA4000T\n" diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 2fd929c5..c689e311 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -7094,6 +7094,7 @@ static struct amigamodels amodels[] = { { 0, }, //{ 1, IDS_QS_MODEL_A4000T }, // "Amiga 4000T" { 4, IDS_QS_MODEL_CD32, { 0, 0, 1, 0, 0, 0 } }, // "CD32" { 4, IDS_QS_MODEL_CDTV, { 0, 0, 1, 0, 0, 0 } }, // "CDTV" + { 4, IDS_QS_MODEL_ALG, { 0, 0, 0, 0, 0, 0 } }, // "American Laser Games" { 4, IDS_QS_MODEL_ARCADIA, { 0, 0, 0, 0, 0, 0 } }, // "Arcadia" { 1, IDS_QS_MODEL_MACROSYSTEM, { 0, 0, 0, 0, 0, 0 } }, { 1, IDS_QS_MODEL_UAE, { 0, 0, 0, 0, 0, 0 } }, // "Expanded UAE example configuration" @@ -7252,7 +7253,14 @@ static void init_quickstartdlg (HWND hDlg) total = 0; xSendDlgItemMessage (hDlg, IDC_QUICKSTART_CONFIGURATION, CB_RESETCONTENT, 0, 0L); if (amodels[quickstart_model].id == IDS_QS_MODEL_ARCADIA) { - struct romlist **rl = getarcadiaroms (); + struct romlist** rl = getarcadiaroms(0); + for (i = 0; rl[i]; i++) { + xSendDlgItemMessage(hDlg, IDC_QUICKSTART_CONFIGURATION, CB_ADDSTRING, 0, (LPARAM)rl[i]->rd->name); + total++; + } + xfree(rl); + } else if (amodels[quickstart_model].id == IDS_QS_MODEL_ALG) { + struct romlist **rl = getarcadiaroms(1); for (i = 0; rl[i]; i++) { xSendDlgItemMessage (hDlg, IDC_QUICKSTART_CONFIGURATION, CB_ADDSTRING, 0, (LPARAM)rl[i]->rd->name); total++; diff --git a/rommgr.cpp b/rommgr.cpp index 912e212d..ba5a1a95 100644 --- a/rommgr.cpp +++ b/rommgr.cpp @@ -1085,15 +1085,24 @@ struct romdata *getarcadiarombyname (const TCHAR *name) return NULL; } -struct romlist **getarcadiaroms (void) +struct romlist **getarcadiaroms(int type) { int i, out, max; void *buf; struct romlist **rdout, *rltmp; + int romtype1, romtype2; + + if (type) { + romtype1 = ROMTYPE_ALG; + romtype2 = ROMTYPE_ALG; + } else { + romtype1 = ROMTYPE_ARCADIABIOS; + romtype2 = ROMTYPE_ARCADIAGAME; + } max = 0; for (i = 0; roms[i].name; i++) { - if (roms[i].group == 0 && (roms[i].type == ROMTYPE_ARCADIABIOS || roms[i].type == ROMTYPE_ARCADIAGAME)) + if (roms[i].group == 0 && (roms[i].type == romtype1 || roms[i].type == romtype2)) max++; } buf = xmalloc (uae_u8, (sizeof (struct romlist*) + sizeof (struct romlist)) * (max + 1)); @@ -1101,7 +1110,7 @@ struct romlist **getarcadiaroms (void) rltmp = (struct romlist*)((uae_u8*)buf + (max + 1) * sizeof (struct romlist*)); out = 0; for (i = 0; roms[i].name; i++) { - if (roms[i].group == 0 && (roms[i].type == ROMTYPE_ARCADIABIOS || roms[i].type == ROMTYPE_ARCADIAGAME)) { + if (roms[i].group == 0 && (roms[i].type == romtype1 || roms[i].type == romtype2)) { rdout[out++] = rltmp; rltmp->path = NULL; rltmp->rd = &roms[i]; @@ -2242,6 +2251,13 @@ int configure_rom (struct uae_prefs *p, const int *rom, int msg) _tcscpy (p->cartfile, path); if (rd->type & ROMTYPE_CPUBOARD) set_device_rom(p, path, ROMTYPE_CPUBOARD, 0); + + if (rd->type & (ROMTYPE_ARCADIAGAME | ROMTYPE_ALG)) { + _stprintf(p->flashfile, _T("%s.nvr"), rd->name); + } + if (rd->type & ROMTYPE_ALG) { + _stprintf(p->genlock_video_file, _T("%s.avi"), rd->name); + } return 1; }