diff --git a/src/emu/bus/ti99_peb/hfdc.c b/src/emu/bus/ti99_peb/hfdc.c index 6d778d3c5e1..42bec79a255 100644 --- a/src/emu/bus/ti99_peb/hfdc.c +++ b/src/emu/bus/ti99_peb/hfdc.c @@ -578,16 +578,20 @@ void myarc_hfdc_device::signal_drive_status() { if ((m_output1_latch & 0xe0)!=0) { - if (m_current_harddisk->ready_r()==ASSERT_LINE) + if (m_current_harddisk != NULL) { - m_status_latch |= HDC_DS_READY; - set_bits(m_status_latch, HDC_DS_SKCOM, m_current_harddisk->seek_complete_r()==ASSERT_LINE); - set_bits(m_status_latch, HDC_DS_TRK00, m_current_harddisk->trk00_r()==ASSERT_LINE); + if (m_current_harddisk->ready_r()==ASSERT_LINE) + { + m_status_latch |= HDC_DS_READY; + set_bits(m_status_latch, HDC_DS_SKCOM, m_current_harddisk->seek_complete_r()==ASSERT_LINE); + set_bits(m_status_latch, HDC_DS_TRK00, m_current_harddisk->trk00_r()==ASSERT_LINE); + } } + // If WDS is selected but not connected, WDS.ready* and WDS.seekComplete* are 1, so Ready=SeekComplete=0 + else set_bits(m_status_latch, HDC_DS_READY | HDC_DS_SKCOM, false); } } - // If WDS is selected but not connected, WDS.ready* and WDS.seekComplete* are 1, so Ready=SeekComplete=0 reply |= m_status_latch; m_hdc9234->auxbus_in(reply); diff --git a/src/lib/formats/flopimg.c b/src/lib/formats/flopimg.c index cc7e00d0ed4..4588d717c00 100644 --- a/src/lib/formats/flopimg.c +++ b/src/lib/formats/flopimg.c @@ -2890,3 +2890,68 @@ void floppy_image_format_t::extract_sectors_from_bitstream_gcr5(const UINT8 *bit } } } + +void floppy_image_format_t::extract_sectors_from_bitstream_victor_gcr5(const UINT8 *bitstream, int track_size, desc_xs *sectors, UINT8 *sectdata, int sectdata_size) +{ + memset(sectors, 0, 256*sizeof(desc_xs)); + + // Don't bother if it's just too small + if(track_size < 100) + return; + + // Start by detecting all id and data blocks + int hblk[100], dblk[100]; + int hblk_count = 0, dblk_count = 0; + + // Precharge the shift register to detect over-the-index stuff + UINT16 shift_reg = 0; + for(int i=0; i<16; i++) + if(sbit_r(bitstream, track_size-16+i)) + shift_reg |= 0x8000 >> i; + + // Scan the bitstream for sync marks and follow them to check for blocks + bool sync = false; + for(int i=0; i; diff --git a/src/lib/formats/victor9k_dsk.h b/src/lib/formats/victor9k_dsk.h index 22f43fa7e3b..1564f1474f7 100644 --- a/src/lib/formats/victor9k_dsk.h +++ b/src/lib/formats/victor9k_dsk.h @@ -31,13 +31,10 @@ public: virtual const char *description() const; virtual const char *extensions() const; - int find_size(io_generic *io, UINT32 form_factor); virtual int identify(io_generic *io, UINT32 form_factor); - void log_boot_sector(UINT8 *data); - floppy_image_format_t::desc_e* get_sector_desc(const format &f, int ¤t_size, int sector_count); - void build_sector_description(const format &f, UINT8 *sectdata, UINT32 sect_offs, desc_s *sectors, int sector_count) const; virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image); - virtual bool supports_save() const; + virtual bool save(io_generic *io, floppy_image *image); + virtual bool supports_save() const { return true; } static int get_rpm(int head, int track); @@ -48,6 +45,14 @@ protected: static const int sectors_per_track[2][80]; static const int speed_zone[2][80]; static const int rpm[9]; + + int find_size(io_generic *io, UINT32 form_factor); + void log_boot_sector(UINT8 *data); + floppy_image_format_t::desc_e* get_sector_desc(const format &f, int ¤t_size, int sector_count); + void build_sector_description(const format &f, UINT8 *sectdata, UINT32 sect_offs, desc_s *sectors, int sector_count) const; + int get_image_offset(const format &f, int head, int track); + int compute_track_size(const format &f, int head, int track); + void extract_sectors(floppy_image *image, const format &f, desc_s *sdesc, int track, int head, int sector_count); }; extern const floppy_format_type FLOPPY_VICTOR_9000_FORMAT; diff --git a/src/mame/drivers/deco32.c b/src/mame/drivers/deco32.c index 859ccc328bb..e1cbc84b339 100644 --- a/src/mame/drivers/deco32.c +++ b/src/mame/drivers/deco32.c @@ -2922,8 +2922,8 @@ ROM_END ROM_START( fghthistu ) /* DE-0395-1 PCB */ ROM_REGION(0x100000, "maincpu", 0 ) /* ARM 32 bit code */ - ROM_LOAD32_WORD( "le-00.1f", 0x000000, 0x80000, CRC(a5c410eb) SHA1(e2b0cb2351782e1155ecc4029010beb7326fd874) ) /* Version 42-05, US */ - ROM_LOAD32_WORD( "le-01.2f", 0x000002, 0x80000, CRC(7e148aa2) SHA1(b21e16604c4d29611f91d629deb9f041eaf41e9b) ) + ROM_LOAD32_WORD( "le00-1.1f", 0x000000, 0x80000, CRC(fccacafb) SHA1(b7236a90a09dbd5870a16aa4e4eac5ab5c098418) ) /* Version 42-06, US */ + ROM_LOAD32_WORD( "le01-1.2f", 0x000002, 0x80000, CRC(06a3c326) SHA1(3d8842fb69def93fc544e89fd0e56ada416157dc) ) ROM_REGION(0x10000, "audiocpu", 0 ) /* Sound CPU */ ROM_LOAD( "le02.18k", 0x00000, 0x10000, CRC(5fd2309c) SHA1(2fb7af54d5cd9bf7dd6fb4f6b82aa52b03294f1f) ) @@ -2954,7 +2954,41 @@ ROM_START( fghthistu ) /* DE-0395-1 PCB */ ROM_LOAD( "ve-01a.4d", 0x0200, 0x0104, NO_DUMP ) /* PAL16L8 is read protected */ ROM_END -ROM_START( fghthistua ) /* DE-0380-2 PCB */ +ROM_START( fghthistua ) /* DE-0395-1 PCB */ + ROM_REGION(0x100000, "maincpu", 0 ) /* ARM 32 bit code */ + ROM_LOAD32_WORD( "le00.1f", 0x000000, 0x80000, CRC(a5c410eb) SHA1(e2b0cb2351782e1155ecc4029010beb7326fd874) ) /* Version 42-05, US */ + ROM_LOAD32_WORD( "le01.2f", 0x000002, 0x80000, CRC(7e148aa2) SHA1(b21e16604c4d29611f91d629deb9f041eaf41e9b) ) + + ROM_REGION(0x10000, "audiocpu", 0 ) /* Sound CPU */ + ROM_LOAD( "le02.18k", 0x00000, 0x10000, CRC(5fd2309c) SHA1(2fb7af54d5cd9bf7dd6fb4f6b82aa52b03294f1f) ) + + ROM_REGION( 0x100000, "gfx1", 0 ) + ROM_LOAD( "mbf00-8.8a", 0x000000, 0x100000, CRC(d3e9b580) SHA1(fc4676e0ecc6c32441ff66fa1f990cc3158237db) ) /* Encrypted tiles */ + + ROM_REGION( 0x100000, "gfx2", 0 ) + ROM_LOAD( "mbf01-8.9a", 0x000000, 0x100000, CRC(0c6ed2eb) SHA1(8e37ef4b1f0b6d3370a08758bfd602cb5f221282) ) /* Encrypted tiles */ + + ROM_REGION( 0x800000, "gfx3", 0 ) /* Sprites */ + ROM_LOAD16_BYTE( "mbf02-16.16d", 0x000001, 0x200000, CRC(c19c5953) SHA1(e6ed26f932c6c86bbd1fc4c000aa2f510c268009) ) + ROM_LOAD16_BYTE( "mbf04-16.18d", 0x000000, 0x200000, CRC(f6a23fd7) SHA1(74e5559f17cd591aa25d2ed6c34ac9ed89e2e9ba) ) + ROM_LOAD16_BYTE( "mbf03-16.17d", 0x400001, 0x200000, CRC(37d25c75) SHA1(8219d31091b4317190618edd8acc49f97cba6a1e) ) + ROM_LOAD16_BYTE( "mbf05-16.19d", 0x400000, 0x200000, CRC(137be66d) SHA1(3fde345183ce04a7a65b4cedfd050d771df7d026) ) + + ROM_REGION(0x80000, "oki1", 0 ) + ROM_LOAD( "mbf06.15k", 0x000000, 0x80000, CRC(fb513903) SHA1(7727a49ff7977f159ed36d097020edef3b5b36ba) ) + + ROM_REGION(0x80000, "oki2", 0 ) + ROM_LOAD( "mbf07.16k", 0x000000, 0x80000, CRC(51d4adc7) SHA1(22106ed7a05db94adc5a783ce34529e29d24d41a) ) + + ROM_REGION(512, "proms", 0 ) + ROM_LOAD( "kt-00.8j", 0, 512, CRC(7294354b) SHA1(14fe42ad5d26d022c0fe9a46a4a9017af2296f40) ) /* MB7124H type prom */ + + ROM_REGION( 0x0400, "plds", 0 ) + ROM_LOAD( "ve-00.3d", 0x0000, 0x0104, NO_DUMP ) /* PAL16L8 is read protected */ + ROM_LOAD( "ve-01a.4d", 0x0200, 0x0104, NO_DUMP ) /* PAL16L8 is read protected */ +ROM_END + +ROM_START( fghthistub ) /* DE-0380-2 PCB */ ROM_REGION(0x100000, "maincpu", 0 ) /* ARM 32 bit code */ ROM_LOAD32_WORD( "kz00-1.1f", 0x000000, 0x80000, CRC(3a3dd15c) SHA1(689b51adf73402b12191a75061b8e709468c91bc) ) /* Version 42-03, US */ ROM_LOAD32_WORD( "kz01-1.2f", 0x000002, 0x80000, CRC(86796cd6) SHA1(c397c07d7a1d03ba96ccb2fe7a0ad25b8331e945) ) @@ -3749,8 +3783,9 @@ GAME( 1991, captavenua, captaven, captaven, captaven, deco32_state, captaven, GAME( 1991, captavenj, captaven, captaven, captaven, deco32_state, captaven, ROT0, "Data East Corporation", "Captain America and The Avengers (Japan Rev 0.2)", 0 ) GAME( 1993, fghthist, 0, fghthist, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (World ver 43-07, DE-0380-2 PCB)", 0 ) -GAME( 1993, fghthistu, fghthist, fghthsta, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (US ver 42-05, DE-0395-1 PCB)", 0 ) -GAME( 1993, fghthistua, fghthist, fghthist, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (US ver 42-03, DE-0380-2 PCB)", 0 ) +GAME( 1993, fghthistu, fghthist, fghthsta, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (US ver 42-06, DE-0395-1 PCB)", 0 ) +GAME( 1993, fghthistua, fghthist, fghthsta, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (US ver 42-05, DE-0395-1 PCB)", 0 ) +GAME( 1993, fghthistub, fghthist, fghthist, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (US ver 42-03, DE-0380-2 PCB)", 0 ) GAME( 1993, fghthistj, fghthist, fghthsta, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (Japan ver 41-07, DE-0395-1 PCB)", 0 ) GAME( 1993, fghthistja, fghthist, fghthist, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (Japan ver 41-05, DE-0380-2 PCB)", 0 ) GAME( 1993, fghthistjb, fghthist, fghthist, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (Japan ver 41-04, DE-0380-1 PCB)", 0 ) diff --git a/src/mame/drivers/dkong.c b/src/mame/drivers/dkong.c index 52dca8d880f..d3d19d933dd 100644 --- a/src/mame/drivers/dkong.c +++ b/src/mame/drivers/dkong.c @@ -1171,7 +1171,14 @@ static INPUT_PORTS_START( dkongjr ) PORT_INCLUDE( dkong_in0_4 ) PORT_INCLUDE( dkong_in1_4 ) PORT_INCLUDE( dkong_in2 ) + PORT_INCLUDE( dkong_dsw0 ) + PORT_MODIFY("DSW0") + PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION( "SW1:!3,!4" ) + PORT_DIPSETTING( 0x00, "10000" ) + PORT_DIPSETTING( 0x04, "15000" ) + PORT_DIPSETTING( 0x08, "20000" ) + PORT_DIPSETTING( 0x0c, "25000" ) #if DEBUG_DISC_SOUND PORT_START("TST") /* TST */ diff --git a/src/mame/drivers/jaguar.c b/src/mame/drivers/jaguar.c index c3ae33ec374..00dfeba82db 100644 --- a/src/mame/drivers/jaguar.c +++ b/src/mame/drivers/jaguar.c @@ -2175,7 +2175,7 @@ ROM_END ROM_START( maxforce ) /* R3000 based, labeled as "Maximum Force 5-23-97 v1.05" */ ROM_REGION( 0x200000, "maincpu", 0 ) /* 2MB for IDT 79R3041 code */ ROM_LOAD32_BYTE( "maxf_105.hh", 0x00000, 0x80000, CRC(ec7f8167) SHA1(0cf057bfb1f30c2c9621d3ed25021e7ba7bdd46e) ) /* Usually found with "light grey" labels */ - ROM_LOAD32_BYTE( "maxf_105.hl", 0x00001, 0x80000, CRC(3172611c) SHA1(00f14f871b737c66c20f95743740d964d0be3f24) ) + ROM_LOAD32_BYTE( "maxf_105.hl", 0x00001, 0x80000, CRC(3172611c) SHA1(00f14f871b737c66c20f95743740d964d0be3f24) ) /* Also found labeled as "MAXIMUM FORCE EE FIX PROG" */ ROM_LOAD32_BYTE( "maxf_105.lh", 0x00002, 0x80000, CRC(84d49423) SHA1(88d9a6724f1118f2bbef5dfa27accc2b65c5ba1d) ) ROM_LOAD32_BYTE( "maxf_105.ll", 0x00003, 0x80000, CRC(16d0768d) SHA1(665a6d7602a7f2f5b1f332b0220b1533143d56b1) ) diff --git a/src/mame/drivers/sf.c b/src/mame/drivers/sf.c index 02c9afee1d1..64bde80393b 100644 --- a/src/mame/drivers/sf.c +++ b/src/mame/drivers/sf.c @@ -140,7 +140,7 @@ WRITE8_MEMBER(sf_state::soundcmd_w) WRITE8_MEMBER(sf_state::sound2_bank_w) { - membank("bank1")->set_base(memregion("audio2")->base() + 0x8000 * (data + 1)); + membank("bank1")->set_entry(data); } WRITE8_MEMBER(sf_state::msm1_5205_w) @@ -518,6 +518,8 @@ void sf_state::machine_start() save_item(NAME(m_sf_active)); save_item(NAME(m_bgscroll)); save_item(NAME(m_fgscroll)); + + membank("bank1")->configure_entries(0, 256, memregion("audio2")->base() + 0x8000, 0x8000); } void sf_state::machine_reset() diff --git a/src/mame/includes/hng64.h b/src/mame/includes/hng64.h index 2dce852e5a0..fdf341c1f0c 100644 --- a/src/mame/includes/hng64.h +++ b/src/mame/includes/hng64.h @@ -323,7 +323,7 @@ public: void setLighting(const UINT16* packet); void set3dFlags(const UINT16* packet); void setCameraProjectionMatrix(const UINT16* packet); - void recoverPolygonBlock(const UINT16* packet, std::vector &polys, int* numPolys); + void recoverPolygonBlock(const UINT16* packet, int* numPolys); void hng64_mark_all_tiles_dirty(int tilemap); void hng64_mark_tile_dirty(int tilemap, int tile_index); @@ -389,4 +389,6 @@ public: DECLARE_READ16_MEMBER(sound_comms_r); DECLARE_WRITE16_MEMBER(sound_comms_w); UINT16 main_latch[2],sound_latch[2]; + + std::vector polys;//(1024*5); }; diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 0f47d0ffd11..db6f740823c 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -6113,8 +6113,9 @@ ragtimea // MBD (c) 1992 (Japan) dblewing // MBE (c) 1993 Mitchell fghthist // MBF (c) 1993 Data East Corporation (World) DE-0380-2 PCB fghthistu // MBF (c) 1993 Data East Corporation (US) DE-0395-1 PCB +fghthistua // MBF (c) 1993 Data East Corporation (US) DE-0395-1 PCB fghthistj // MBF (c) 1993 Data East Corporation (Japan) DE-0395-1 PCB -fghthistua // MBF (c) 1993 Data East Corporation (US) DE-0380-2 PCB +fghthistub // MBF (c) 1993 Data East Corporation (US) DE-0380-2 PCB fghthistja // MBF (c) 1993 Data East Corporation (Japan) DE-0380-2 PCB fghthistjb // MBF (c) 1993 Data East Corporation (Japan) DE-0380-1 PCB hvysmsh // MBG (c) 1993 Data East Corporation (World) diff --git a/src/mame/video/hng64.c b/src/mame/video/hng64.c index 9f7028d11de..0a93b093cf6 100644 --- a/src/mame/video/hng64.c +++ b/src/mame/video/hng64.c @@ -1274,6 +1274,7 @@ void hng64_state::video_start() m_dl = auto_alloc_array(machine(), UINT16, 0x200/2); + polys.resize(1024*5); m_texturerom = memregion("textures")->base(); m_vertsrom = (UINT16*)memregion("verts")->base(); diff --git a/src/mame/video/hng64_3d.c b/src/mame/video/hng64_3d.c index 9f4d1d2fefc..ab05fd53a33 100644 --- a/src/mame/video/hng64_3d.c +++ b/src/mame/video/hng64_3d.c @@ -48,7 +48,7 @@ WRITE32_MEMBER(hng64_state::dl_upload_w) // this is written after the game uploads 16 packets, each 32 bytes long (2x 16 words?) // we're assuming it to be a 'send to 3d hardware' trigger. // this can be called multiple times per frame (at least 2, as long as it gets the expected interrupt / status flags) - +g_profiler.start(PROFILER_USER1); for(int packetStart=0;packetStart<0x200;packetStart+=32) { // Send it off to the 3d subsystem. @@ -56,6 +56,7 @@ WRITE32_MEMBER(hng64_state::dl_upload_w) } machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(0x200*8), timer_expired_delegate(FUNC(hng64_state::hng64_3dfifo_processed),this)); +g_profiler.stop(); } TIMER_CALLBACK_MEMBER(hng64_state::hng64_3dfifo_processed ) @@ -284,7 +285,7 @@ void hng64_state::setCameraProjectionMatrix(const UINT16* packet) // Operation 0100 // Polygon rasterization. -void hng64_state::recoverPolygonBlock(const UINT16* packet, std::vector &polys, int* numPolys) +void hng64_state::recoverPolygonBlock(const UINT16* packet, int* numPolys) { /*////////////// // PACKET FORMAT @@ -863,9 +864,7 @@ void hng64_state::recoverPolygonBlock(const UINT16* packet, std::vector polys(1024*5); //printf("packet type : %04x %04x|%04x %04x|%04x %04x|%04x %04x | %04x %04x %04x %04x %04x %04x %04x %04x\n", packet[0],packet[1],packet[2],packet[3],packet[4],packet[5],packet[6],packet[7], packet[8], packet[9], packet[10], packet[11], packet[12], packet[13], packet[14], packet[15]); @@ -899,7 +898,7 @@ void hng64_state::hng64_command3d(const UINT16* packet) if (packet[2] == 0x0003 && packet[3] == 0x8f37 && m_mcu_type == SHOOT_MCU) break; - recoverPolygonBlock( packet, polys, &numPolys); + recoverPolygonBlock( packet, &numPolys); break; case 0x0102: // Geometry with only translation @@ -919,7 +918,7 @@ void hng64_state::hng64_command3d(const UINT16* packet) miniPacket[7] = 0x7fff; miniPacket[11] = 0x7fff; miniPacket[15] = 0x7fff; - recoverPolygonBlock( miniPacket, polys, &numPolys); + recoverPolygonBlock( miniPacket, &numPolys); memset(miniPacket, 0, sizeof(UINT16)*16); for (int i = 0; i < 7; i++) miniPacket[i] = packet[i+8]; @@ -927,7 +926,7 @@ void hng64_state::hng64_command3d(const UINT16* packet) miniPacket[7] = 0x7fff; miniPacket[11] = 0x7fff; miniPacket[15] = 0x7fff; - recoverPolygonBlock( miniPacket, polys, &numPolys); + recoverPolygonBlock( miniPacket, &numPolys); break; case 0x1000: // Unknown: Some sort of global flags? diff --git a/src/mess/drivers/hh_tms1k.c b/src/mess/drivers/hh_tms1k.c index 30c0a4baf50..0c72e8bfc40 100644 --- a/src/mess/drivers/hh_tms1k.c +++ b/src/mess/drivers/hh_tms1k.c @@ -25,7 +25,8 @@ *MP2105 TMS1370 1979, Gakken Poker, Entex Electronic Poker *MP2139 TMS1370? 1982, Gakken Galaxy Invader 1000 *MP2788 ? 1980, Bandai Flight Time (? note: VFD-capable) - @MP3226 TMS1000 1978, Milton Bradley Simon + *MP3208 TMS1000 1977, Milton Bradley Electronic Battleship (1977, model 4750A or B) + @MP3226 TMS1000 1978, Milton Bradley Simon (model 4850) *MP3301 TMS1000 1979, Milton Bradley Big Trak *MP3320A TMS1000 1979, Coleco Head to Head Basketball MP3403 TMS1100 1978, Marx Electronic Bowling -> elecbowl.c