From b9d235eaa7d6831ad7c164e51a35f63ad5ea16d7 Mon Sep 17 00:00:00 2001 From: Happy Date: Fri, 30 Oct 2015 15:31:02 -0600 Subject: [PATCH 1/2] n64: Simulation of cpu cycles that would be used during the skipped RDRAM initialization. This allows the initialization of the SI to see a closer to expected system uptime when requested. --- src/devices/cpu/mips/mips3.c | 5 +++ src/devices/cpu/mips/mips3.h | 4 +- src/mame/machine/n64.c | 14 ++++++ src/mame/mess.lst | 82 ++++++++++++++++++------------------ 4 files changed, 63 insertions(+), 42 deletions(-) diff --git a/src/devices/cpu/mips/mips3.c b/src/devices/cpu/mips/mips3.c index 907adfb2926..ab210440d9d 100644 --- a/src/devices/cpu/mips/mips3.c +++ b/src/devices/cpu/mips/mips3.c @@ -2701,6 +2701,11 @@ void mips3_device::handle_special(UINT32 op) } } +void mips3_device::burn_cycles(INT32 cycles) +{ + execute_burn(cycles); +} + void mips3_device::execute_run() { if (m_isdrc) diff --git a/src/devices/cpu/mips/mips3.h b/src/devices/cpu/mips/mips3.h index 87462f79d5b..9cbf28aa8ed 100644 --- a/src/devices/cpu/mips/mips3.h +++ b/src/devices/cpu/mips/mips3.h @@ -300,7 +300,8 @@ public: void clear_fastram(UINT32 select_start); void mips3drc_set_options(UINT32 options); void mips3drc_add_hotspot(offs_t pc, UINT32 opcode, UINT32 cycles); - + void burn_cycles(INT32 cycles); + protected: // device-level overrides virtual void device_start(); @@ -313,6 +314,7 @@ protected: virtual UINT32 execute_input_lines() const { return 6; } virtual void execute_run(); virtual void execute_set_input(int inputnum, int state); + virtual void execute_burn(INT32 cycles) { m_totalcycles += cycles; } // device_memory_interface overrides virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } diff --git a/src/mame/machine/n64.c b/src/mame/machine/n64.c index fda94a7fde8..a57db69e0b6 100644 --- a/src/mame/machine/n64.c +++ b/src/mame/machine/n64.c @@ -1667,6 +1667,20 @@ WRITE32_MEMBER( n64_periphs::pi_reg_w ) READ32_MEMBER( n64_periphs::ri_reg_r ) { + if(offset == 0x0C/4) // RI_SELECT + { + /* This is to 'simulate' the time that RDRAM initialization + would take if the RI registers were not set to skip the RDRAM + testing during device reset. Proper simulation would require + emulating the RDRAM modules and bus stalls for the mips cpu. + The cycle amount chosen represents 1/2 second, which is not + necessarily the time for RDRAM initialization, but rather the + time recommended for letting the SI devices settle after startup. + This allows the initialization routines for the SI to see that a + proper amount of time has passed since system startup. */ + machine().device("maincpu")->burn_cycles(93750000/2); + } + if(offset > 0x1c/4) { logerror("ri_reg_r: %08X, %08X at %08X\n", offset, mem_mask, maincpu->safe_pc()); diff --git a/src/mame/mess.lst b/src/mame/mess.lst index 59e2dfc09b6..f67709c0384 100644 --- a/src/mame/mess.lst +++ b/src/mame/mess.lst @@ -61,18 +61,18 @@ sf7000 // Sega SC-3000 w/ SF-7000 (Japan) omv1000 // Tsukuda Original Othello Multivision FG-1000 omv2000 // Tsukuda Original Othello Multivision FG-2000 -gamegear // Sega GameGear -gamegeaj // Sega GameGear (Japan) -sms // Sega Master System II (NTSC) -sms1 // Sega Master System I (NTSC) -sms1pal // Sega Master System I (PAL) -smspal // Sega Master System II (PAL) -smsj // Sega Master System (Japan) with FM Chip -sg1000m3 // Sega SG-1000 Mark III (Japan) -sms1krfm // Samsung Gam*Boy I (Korea) with FM Chip -sms1kr // Samsung Gam*Boy I (Korea) -smskr // Samsung Gam*Boy II (Korea) -smssdisp // Sega Master System Store Display Unit +//gamegear // Sega GameGear +//gamegeaj // Sega GameGear (Japan) +//sms // Sega Master System II (NTSC) +//sms1 // Sega Master System I (NTSC) +//sms1pal // Sega Master System I (PAL) +//smspal // Sega Master System II (PAL) +//smsj // Sega Master System (Japan) with FM Chip +//sg1000m3 // Sega SG-1000 Mark III (Japan) +//sms1krfm // Samsung Gam*Boy I (Korea) with FM Chip +//sms1kr // Samsung Gam*Boy I (Korea) +//smskr // Samsung Gam*Boy II (Korea) +//smssdisp // Sega Master System Store Display Unit megadrij // 1988 Sega Mega Drive (Japan) genesis // 1989 Sega Genesis (USA) @@ -117,7 +117,7 @@ dceu // 1999 Sega Dreamcast (Europe) dcdev // 1998 Sega HKT-0120 Sega Dreamcast Development Box dcprt // 1998 Sega Katana Set 5 Prototype -svmu // 1998 Sega Visual Memory Unit +//svmu // 1998 Sega Visual Memory Unit // Sony psj // 1994 Sony PlayStation (Japan) @@ -385,7 +385,7 @@ f1 f1e f2 f10 -fp +//fp // Cambridge Computers z88 // Z88 (UK) @@ -661,22 +661,22 @@ c64gs // Commodore 64 Games System c64dtv // Commodore 64 Direct-to-TV clcd // Commodore LCD -b500 // Commodore B500 -b128 // Commodore B128 -b256 // Commodore B256 -cbm610 // Commodore CBM 610 -cbm620 // Commodore CBM 620 -cbm620_hu // Commodore CBM 620 (Hungary) -b128hp // Commodore B128HP -b256hp // Commodore B256HP -bx256hp // Commodore BX256HP -cbm710 // Commodore CBM 710 -cbm720 // Commodore CBM 720 -cbm720_de -cbm720_se // Commodore CBM 720 (Sweden / Finland) -cbm730 -p500 // Commodore P500 (proto, a.k.a. C128-40, PET-II) -p500p +//b500 // Commodore B500 +//b128 // Commodore B128 +//b256 // Commodore B256 +//cbm610 // Commodore CBM 610 +//cbm620 // Commodore CBM 620 +//cbm620_hu // Commodore CBM 620 (Hungary) +//b128hp // Commodore B128HP +//b256hp // Commodore B256HP +//bx256hp // Commodore BX256HP +//cbm710 // Commodore CBM 710 +//cbm720 // Commodore CBM 720 +//cbm720_de +//cbm720_se // Commodore CBM 720 (Sweden / Finland) +//cbm730 +//p500 // Commodore P500 (proto, a.k.a. C128-40, PET-II) +//p500p c264 plus4 @@ -732,8 +732,8 @@ a4000tn c65 // 1991 C65 / C64DX (Prototype, NTSC) c64dx // 1991 C65 / C64DX (Prototype, German PAL) -mps1000 // 1986 Commodore MPS-1000 (dot matrix printer) -mps1230 // 1988 Commodore MPS-1230 near-letter-quality dot matrix printer +//mps1000 // 1986 Commodore MPS-1000 (dot matrix printer) +//mps1230 // 1988 Commodore MPS-1230 near-letter-quality dot matrix printer // Epson px4 // 1985 Epson PX-4 @@ -1785,8 +1785,8 @@ abc806 abc1600 // Be Incorporated -bebox // BeBox Dual603-66 -bebox2 // BeBox Dual603-133 +//bebox // BeBox Dual603-66 +//bebox2 // BeBox Dual603-133 // Tiger Electronics gamecom // Tiger Game.com @@ -1866,8 +1866,8 @@ bk0010fd bk0011m // Bashkiria-2M -b2m -b2mrom +//b2m +//b2mrom // Radio-86RK radio86 @@ -1897,10 +1897,10 @@ braiplus irisha // PK-8020 -korvet -kontur -neiva -bk8t +//korvet +//kontur +//neiva +//bk8t // Vector-06c vector06 @@ -2522,7 +2522,7 @@ uvc bridgec3 vbrc vsc -victor9k +//victor9k phc25 phc25j pv9234 From 1e9a4f34eb3048bcd99e77f9a92fd3ed18e547b8 Mon Sep 17 00:00:00 2001 From: Happy Date: Fri, 30 Oct 2015 15:47:27 -0600 Subject: [PATCH 2/2] Revert accidental change --- src/mame/mess.lst | 82 +++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/src/mame/mess.lst b/src/mame/mess.lst index f67709c0384..59e2dfc09b6 100644 --- a/src/mame/mess.lst +++ b/src/mame/mess.lst @@ -61,18 +61,18 @@ sf7000 // Sega SC-3000 w/ SF-7000 (Japan) omv1000 // Tsukuda Original Othello Multivision FG-1000 omv2000 // Tsukuda Original Othello Multivision FG-2000 -//gamegear // Sega GameGear -//gamegeaj // Sega GameGear (Japan) -//sms // Sega Master System II (NTSC) -//sms1 // Sega Master System I (NTSC) -//sms1pal // Sega Master System I (PAL) -//smspal // Sega Master System II (PAL) -//smsj // Sega Master System (Japan) with FM Chip -//sg1000m3 // Sega SG-1000 Mark III (Japan) -//sms1krfm // Samsung Gam*Boy I (Korea) with FM Chip -//sms1kr // Samsung Gam*Boy I (Korea) -//smskr // Samsung Gam*Boy II (Korea) -//smssdisp // Sega Master System Store Display Unit +gamegear // Sega GameGear +gamegeaj // Sega GameGear (Japan) +sms // Sega Master System II (NTSC) +sms1 // Sega Master System I (NTSC) +sms1pal // Sega Master System I (PAL) +smspal // Sega Master System II (PAL) +smsj // Sega Master System (Japan) with FM Chip +sg1000m3 // Sega SG-1000 Mark III (Japan) +sms1krfm // Samsung Gam*Boy I (Korea) with FM Chip +sms1kr // Samsung Gam*Boy I (Korea) +smskr // Samsung Gam*Boy II (Korea) +smssdisp // Sega Master System Store Display Unit megadrij // 1988 Sega Mega Drive (Japan) genesis // 1989 Sega Genesis (USA) @@ -117,7 +117,7 @@ dceu // 1999 Sega Dreamcast (Europe) dcdev // 1998 Sega HKT-0120 Sega Dreamcast Development Box dcprt // 1998 Sega Katana Set 5 Prototype -//svmu // 1998 Sega Visual Memory Unit +svmu // 1998 Sega Visual Memory Unit // Sony psj // 1994 Sony PlayStation (Japan) @@ -385,7 +385,7 @@ f1 f1e f2 f10 -//fp +fp // Cambridge Computers z88 // Z88 (UK) @@ -661,22 +661,22 @@ c64gs // Commodore 64 Games System c64dtv // Commodore 64 Direct-to-TV clcd // Commodore LCD -//b500 // Commodore B500 -//b128 // Commodore B128 -//b256 // Commodore B256 -//cbm610 // Commodore CBM 610 -//cbm620 // Commodore CBM 620 -//cbm620_hu // Commodore CBM 620 (Hungary) -//b128hp // Commodore B128HP -//b256hp // Commodore B256HP -//bx256hp // Commodore BX256HP -//cbm710 // Commodore CBM 710 -//cbm720 // Commodore CBM 720 -//cbm720_de -//cbm720_se // Commodore CBM 720 (Sweden / Finland) -//cbm730 -//p500 // Commodore P500 (proto, a.k.a. C128-40, PET-II) -//p500p +b500 // Commodore B500 +b128 // Commodore B128 +b256 // Commodore B256 +cbm610 // Commodore CBM 610 +cbm620 // Commodore CBM 620 +cbm620_hu // Commodore CBM 620 (Hungary) +b128hp // Commodore B128HP +b256hp // Commodore B256HP +bx256hp // Commodore BX256HP +cbm710 // Commodore CBM 710 +cbm720 // Commodore CBM 720 +cbm720_de +cbm720_se // Commodore CBM 720 (Sweden / Finland) +cbm730 +p500 // Commodore P500 (proto, a.k.a. C128-40, PET-II) +p500p c264 plus4 @@ -732,8 +732,8 @@ a4000tn c65 // 1991 C65 / C64DX (Prototype, NTSC) c64dx // 1991 C65 / C64DX (Prototype, German PAL) -//mps1000 // 1986 Commodore MPS-1000 (dot matrix printer) -//mps1230 // 1988 Commodore MPS-1230 near-letter-quality dot matrix printer +mps1000 // 1986 Commodore MPS-1000 (dot matrix printer) +mps1230 // 1988 Commodore MPS-1230 near-letter-quality dot matrix printer // Epson px4 // 1985 Epson PX-4 @@ -1785,8 +1785,8 @@ abc806 abc1600 // Be Incorporated -//bebox // BeBox Dual603-66 -//bebox2 // BeBox Dual603-133 +bebox // BeBox Dual603-66 +bebox2 // BeBox Dual603-133 // Tiger Electronics gamecom // Tiger Game.com @@ -1866,8 +1866,8 @@ bk0010fd bk0011m // Bashkiria-2M -//b2m -//b2mrom +b2m +b2mrom // Radio-86RK radio86 @@ -1897,10 +1897,10 @@ braiplus irisha // PK-8020 -//korvet -//kontur -//neiva -//bk8t +korvet +kontur +neiva +bk8t // Vector-06c vector06 @@ -2522,7 +2522,7 @@ uvc bridgec3 vbrc vsc -//victor9k +victor9k phc25 phc25j pv9234