From 554a828b4cb47290fded9c5f9f96f765d3546da9 Mon Sep 17 00:00:00 2001 From: Stiletto Date: Thu, 12 Feb 2015 12:31:58 -0500 Subject: According to the MAME Plus Chinese gamelist, bigd2 is Zhong Guo Chu Da D. --- src/mame/drivers/igs_m027.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mame/drivers/igs_m027.c b/src/mame/drivers/igs_m027.c index 754dde25f6b..a352f0e4c53 100644 --- a/src/mame/drivers/igs_m027.c +++ b/src/mame/drivers/igs_m027.c @@ -61,7 +61,7 @@ public: DECLARE_DRIVER_INIT(gonefsh2); DECLARE_DRIVER_INIT(sddz); DECLARE_DRIVER_INIT(hauntedh); - DECLARE_DRIVER_INIT(bigd2); + DECLARE_DRIVER_INIT(zhongguo); DECLARE_DRIVER_INIT(klxyj); DECLARE_DRIVER_INIT(fearless); TILE_GET_INFO_MEMBER(get_tx_tilemap_tile_info); @@ -569,7 +569,7 @@ ROM_END /* -Big D2 +Zhong Guo Chu Da D IGS, 2000 PCB Layout @@ -612,10 +612,10 @@ Notes: */ -ROM_START( bigd2 ) +ROM_START( zhongguo ) ROM_REGION( 0x04000, "maincpu", 0 ) /* Internal rom of IGS027A ARM based MCU */ - ROM_LOAD( "bigd2_igs027a", 0x00000, 0x4000, NO_DUMP ) + ROM_LOAD( "zhongguo_igs027a", 0x00000, 0x4000, NO_DUMP ) ROM_REGION( 0x80000, "user1", 0 ) // external ARM data / prg ROM_LOAD( "p2600.u10", 0x000000, 0x80000, CRC(9ad34135) SHA1(54717753d1296efe49946369fd4a27181f19dbc0) ) @@ -953,9 +953,9 @@ DRIVER_INIT_MEMBER(igs_m027_state,gonefsh2) pgm_create_dummy_internal_arm_region(); } -DRIVER_INIT_MEMBER(igs_m027_state,bigd2) +DRIVER_INIT_MEMBER(igs_m027_state,zhongguo) { - big2_decrypt(machine()); + zhongguo_decrypt(machine()); //sdwx_gfx_decrypt(machine()); pgm_create_dummy_internal_arm_region(); } @@ -968,7 +968,7 @@ DRIVER_INIT_MEMBER(igs_m027_state,bigd2) GAME( 2002, sdwx, 0, igs_majhong, sdwx, igs_m027_state, sdwx, ROT0, "IGS", "Sheng Dan Wu Xian", GAME_IS_SKELETON ) // aka Christmas 5 Line? GAME( 200?, sddz, 0, igs_majhong, sdwx, igs_m027_state, sddz, ROT0, "IGS", "Super Dou Di Zhu", GAME_IS_SKELETON ) -GAME( 2000, bigd2, 0, igs_majhong, sdwx, igs_m027_state, bigd2, ROT0, "IGS", "Big D2", GAME_IS_SKELETON ) +GAME( 2000, zhongguo, 0, igs_majhong, sdwx, igs_m027_state, zhongguo, ROT0, "IGS", "Zhong Guo Chu Da D", GAME_IS_SKELETON ) GAME( 200?, lhzb3, 0, igs_majhong, sdwx, igs_m027_state, lhzb3, ROT0, "IGS", "Long Hu Zheng Ba 3", GAME_IS_SKELETON ) GAME( 200?, lhzb4, 0, igs_majhong, sdwx, igs_m027_state, lhzb4, ROT0, "IGS", "Long Hu Zheng Ba 4", GAME_IS_SKELETON ) GAME( 200?, klxyj, 0, igs_majhong, sdwx, igs_m027_state, klxyj, ROT0, "IGS", "Kuai Le Xi You Ji", GAME_IS_SKELETON ) -- cgit v1.2.3 From cdba2f21b76c60d8ee81a9bb2609da0700f8e1b6 Mon Sep 17 00:00:00 2001 From: Stiletto Date: Thu, 12 Feb 2015 12:32:59 -0500 Subject: (nw) (nw) --- src/mame/mame.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index deff10be1e7..bf936d1a583 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -9766,7 +9766,7 @@ tarzana // (c) 1999? starzan // (c) 2000? // IGS027A Cpu Games -bigd2 // (c) 2000 +zhongguo // (c) 2000 sdwx // (c) 2002 sddz // (c) 200? lhzb3 // (c) 200? -- cgit v1.2.3 From 9f866f8ccf43856781d6031cfd92ab35971229a4 Mon Sep 17 00:00:00 2001 From: Stiletto Date: Thu, 12 Feb 2015 12:34:08 -0500 Subject: (nw) (nw) --- src/mame/machine/pgmcrypt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/machine/pgmcrypt.h b/src/mame/machine/pgmcrypt.h index 6bda40d33e0..a92c7a7a27b 100644 --- a/src/mame/machine/pgmcrypt.h +++ b/src/mame/machine/pgmcrypt.h @@ -24,7 +24,7 @@ void sdwx_decrypt(running_machine &machine); void hauntedh_decrypt(running_machine &machine); void chessc2_decrypt(running_machine &machine); void klxyj_decrypt(running_machine &machine); -void big2_decrypt(running_machine &machine); +void zhongguo_decrypt(running_machine &machine); void gonefsh2_decrypt(running_machine &machine); void sddz_decrypt(running_machine &machine); void lhzb3_decrypt(running_machine &machine); -- cgit v1.2.3 From a2f6af88c76f49183432b3cf1a0dbf82fc6ab76d Mon Sep 17 00:00:00 2001 From: Stiletto Date: Thu, 12 Feb 2015 12:34:28 -0500 Subject: (nw) (nw) --- src/mame/machine/pgmcrypt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mame/machine/pgmcrypt.c b/src/mame/machine/pgmcrypt.c index bca2ddb4382..014181058fb 100644 --- a/src/mame/machine/pgmcrypt.c +++ b/src/mame/machine/pgmcrypt.c @@ -1120,7 +1120,7 @@ void klxyj_decrypt(running_machine &machine) } } -static const UINT8 big2_tab[0x100] = { +static const UINT8 zhongguo_tab[0x100] = { 0x68, 0x56, 0xC2, 0x54, 0xA2, 0x8C, 0x7B, 0x4F, 0x37, 0xAC, 0x60, 0xF8, 0x24, 0xDF, 0x3E, 0x6B, 0xE2, 0x89, 0x3D, 0xF3, 0x31, 0x83, 0x4A, 0x65, 0x27, 0x98, 0xC5, 0xBF, 0x78, 0x3E, 0x6C, 0x02, 0x07, 0x96, 0x88, 0x4D, 0xAE, 0xA6, 0x56, 0x3A, 0x4A, 0xD5, 0xB8, 0x7E, 0x0B, 0xA7, 0x1D, 0xBC, @@ -1139,7 +1139,7 @@ static const UINT8 big2_tab[0x100] = { 0x1E, 0xA6, 0xFC, 0xFE, 0xE3, 0x8E, 0xB1, 0xB7, 0x0F, 0x32, 0xF1, 0xCF, 0x36, 0xFE, 0x65, 0x8E }; -void big2_decrypt(running_machine &machine) +void zhongguo_decrypt(running_machine &machine) { int i; UINT16 *src = (UINT16 *) machine.root_device().memregion("user1")->base(); @@ -1158,7 +1158,7 @@ void big2_decrypt(running_machine &machine) IGS27_CRYPT7 IGS27_CRYPT8 - x ^= big2_tab[(i>> 1) & 0xff] << 8; + x ^= zhongguo_tab[(i>> 1) & 0xff] << 8; src[i] = x; } -- cgit v1.2.3 From be88bed2384951aae8c1f9bff51c74fbc0ce128f Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 12 Feb 2015 18:36:34 +0100 Subject: Better performance for -verifyroms on samba share [qmc2] --- src/emu/audit.c | 1 + src/emu/fileio.c | 37 +++++++++++++++++++++++++++++++------ src/emu/fileio.h | 7 ++++++- 3 files changed, 38 insertions(+), 7 deletions(-) diff --git a/src/emu/audit.c b/src/emu/audit.c index e02ddbcc77b..8de307d0728 100644 --- a/src/emu/audit.c +++ b/src/emu/audit.c @@ -421,6 +421,7 @@ audit_record *media_auditor::audit_one_rom(const rom_entry *rom) // find the file and checksum it, getting the file length along the way emu_file file(m_enumerator.options().media_path(), OPEN_FLAG_READ | OPEN_FLAG_NO_PRELOAD); + file.set_restrict_to_mediapath(true); path_iterator path(m_searchpath); astring curpath; while (path.next(curpath, record.name())) diff --git a/src/emu/fileio.c b/src/emu/fileio.c index 4883c199d4a..cc4ff44ff2a 100644 --- a/src/emu/fileio.c +++ b/src/emu/fileio.c @@ -141,13 +141,15 @@ const osd_directory_entry *file_enumerator::next() emu_file::emu_file(UINT32 openflags) : m_file(NULL), m_iterator(""), + m_mediapaths(""), m_crc(0), m_openflags(openflags), m_zipfile(NULL), m_ziplength(0), m__7zfile(NULL), m__7zlength(0), - m_remove_on_close(false) + m_remove_on_close(false), + m_restrict_to_mediapath(false) { // sanity check the open flags if ((m_openflags & OPEN_FLAG_HAS_CRC) && (m_openflags & OPEN_FLAG_WRITE)) @@ -157,13 +159,15 @@ emu_file::emu_file(UINT32 openflags) emu_file::emu_file(const char *searchpath, UINT32 openflags) : m_file(NULL), m_iterator(searchpath), + m_mediapaths(searchpath), m_crc(0), m_openflags(openflags), m_zipfile(NULL), m_ziplength(0), m__7zfile(NULL), m__7zlength(0), - m_remove_on_close(false) + m_remove_on_close(false), + m_restrict_to_mediapath(false) { // sanity check the open flags if ((m_openflags & OPEN_FLAG_HAS_CRC) && (m_openflags & OPEN_FLAG_WRITE)) @@ -354,17 +358,15 @@ file_error emu_file::open_next() { astring tempfullpath = m_fullpath; - filerr = attempt__7zped(); + filerr = attempt_zipped(); if (filerr == FILERR_NONE) break; m_fullpath = tempfullpath; - filerr = attempt_zipped(); + filerr = attempt__7zped(); if (filerr == FILERR_NONE) break; - - } } return filerr; @@ -650,6 +652,21 @@ int emu_file::vprintf(const char *fmt, va_list va) } +//------------------------------------------------- +// part_of_mediapath - checks if 'path' is part of +// any media path +//------------------------------------------------- + +bool emu_file::part_of_mediapath(astring path) +{ + bool result = false; + astring mediapath; + m_mediapaths.reset(); + while (m_mediapaths.next(mediapath, NULL) && !result) + if (path.cmpsubstr(mediapath, 0, mediapath.len())) + result = true; + return result; +} //------------------------------------------------- // attempt_zipped - attempt to open a ZIPped file @@ -667,6 +684,10 @@ file_error emu_file::attempt_zipped() if (dirsep == -1) return FILERR_NOT_FOUND; + if (restrict_to_mediapath()) + if ( !part_of_mediapath(m_fullpath) ) + return FILERR_NOT_FOUND; + // insert the part from the right of the separator into the head of the filename if (filename.len() > 0) filename.ins(0, "/"); @@ -798,6 +819,10 @@ file_error emu_file::attempt__7zped() if (dirsep == -1) return FILERR_NOT_FOUND; + if (restrict_to_mediapath()) + if ( !part_of_mediapath(m_fullpath) ) + return FILERR_NOT_FOUND; + // insert the part from the right of the separator into the head of the filename if (filename.len() > 0) filename.ins(0, "/"); diff --git a/src/emu/fileio.h b/src/emu/fileio.h index b5781a5d1c3..5b2c4d7948c 100644 --- a/src/emu/fileio.h +++ b/src/emu/fileio.h @@ -97,10 +97,13 @@ public: const char *fullpath() const { return m_fullpath; } UINT32 openflags() const { return m_openflags; } hash_collection &hashes(const char *types); + bool restrict_to_mediapath() { return m_restrict_to_mediapath; } + bool part_of_mediapath(astring path); // setters void remove_on_close() { m_remove_on_close = true; } void set_openflags(UINT32 openflags) { assert(m_file == NULL); m_openflags = openflags; } + void set_restrict_to_mediapath(bool rtmp = true) { m_restrict_to_mediapath = rtmp; } // open/close file_error open(const char *name); @@ -151,7 +154,8 @@ private: astring m_fullpath; // full filename core_file * m_file; // core file pointer path_iterator m_iterator; // iterator for paths - UINT32 m_crc; // iterator for paths + path_iterator m_mediapaths; // media-path iterator + UINT32 m_crc; // file's CRC UINT32 m_openflags; // flags we used for the open hash_collection m_hashes; // collection of hashes @@ -164,6 +168,7 @@ private: UINT64 m__7zlength; // 7Z file length bool m_remove_on_close; // flag: remove the file when closing + bool m_restrict_to_mediapath; // flag: restrict to paths inside the media-path }; -- cgit v1.2.3 From e48821001129ab663b5efe274cd1f2fb15408fc4 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Thu, 12 Feb 2015 19:37:10 +0100 Subject: chaknpop.c: enabled save state support, removed unneeded prefixes (nw) --- src/mame/drivers/chaknpop.c | 16 +++++++------- src/mame/includes/chaknpop.h | 50 +++++++++++++++++++++++++------------------- src/mame/machine/chaknpop.c | 12 +++++------ src/mame/video/chaknpop.c | 23 +++++++++----------- 4 files changed, 52 insertions(+), 49 deletions(-) diff --git a/src/mame/drivers/chaknpop.c b/src/mame/drivers/chaknpop.c index e4af56e852c..56afb0856ca 100644 --- a/src/mame/drivers/chaknpop.c +++ b/src/mame/drivers/chaknpop.c @@ -143,19 +143,19 @@ WRITE8_MEMBER(chaknpop_state::coinlock_w) static ADDRESS_MAP_START( chaknpop_map, AS_PROGRAM, 8, chaknpop_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("mcu_ram") - AM_RANGE(0x8800, 0x8800) AM_READWRITE(chaknpop_mcu_port_a_r, chaknpop_mcu_port_a_w) - AM_RANGE(0x8801, 0x8801) AM_READWRITE(chaknpop_mcu_port_b_r, chaknpop_mcu_port_b_w) - AM_RANGE(0x8802, 0x8802) AM_READWRITE(chaknpop_mcu_port_c_r, chaknpop_mcu_port_c_w) + AM_RANGE(0x8800, 0x8800) AM_READWRITE(mcu_port_a_r, mcu_port_a_w) + AM_RANGE(0x8801, 0x8801) AM_READWRITE(mcu_port_b_r, mcu_port_b_w) + AM_RANGE(0x8802, 0x8802) AM_READWRITE(mcu_port_c_r, mcu_port_c_w) AM_RANGE(0x8804, 0x8805) AM_DEVREADWRITE("ay1", ay8910_device, data_r, address_data_w) AM_RANGE(0x8806, 0x8807) AM_DEVREADWRITE("ay2", ay8910_device, data_r, address_data_w) AM_RANGE(0x8808, 0x8808) AM_READ_PORT("DSWC") AM_RANGE(0x8809, 0x8809) AM_READ_PORT("P1") AM_RANGE(0x880a, 0x880a) AM_READ_PORT("SYSTEM") AM_RANGE(0x880b, 0x880b) AM_READ_PORT("P2") - AM_RANGE(0x880c, 0x880c) AM_READWRITE(chaknpop_gfxmode_r, chaknpop_gfxmode_w) + AM_RANGE(0x880c, 0x880c) AM_READWRITE(gfxmode_r, gfxmode_w) AM_RANGE(0x880d, 0x880d) AM_WRITE(coinlock_w) // coin lock out - AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(chaknpop_txram_w) AM_SHARE("tx_ram") // TX tilemap - AM_RANGE(0x9800, 0x983f) AM_RAM_WRITE(chaknpop_attrram_w) AM_SHARE("attr_ram") // Color attribute + AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(txram_w) AM_SHARE("tx_ram") // TX tilemap + AM_RANGE(0x9800, 0x983f) AM_RAM_WRITE(attrram_w) AM_SHARE("attr_ram") // Color attribute AM_RANGE(0x9840, 0x98ff) AM_RAM AM_SHARE("spr_ram") // sprite AM_RANGE(0xa000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xffff) AM_RAMBANK("bank1") // bitmap plane 1-4 @@ -362,7 +362,7 @@ static MACHINE_CONFIG_START( chaknpop, chaknpop_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_DRIVER(chaknpop_state, screen_update_chaknpop) + MCFG_SCREEN_UPDATE_DRIVER(chaknpop_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", chaknpop) @@ -416,4 +416,4 @@ ROM_END /* ( YEAR NAME PARENT MACHINE INPUT INIT MONITOR COMPANY FULLNAME ) */ -GAME( 1983, chaknpop, 0, chaknpop, chaknpop, driver_device, 0, ROT0, "Taito Corporation", "Chack'n Pop", 0 ) +GAME( 1983, chaknpop, 0, chaknpop, chaknpop, driver_device, 0, ROT0, "Taito Corporation", "Chack'n Pop", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/includes/chaknpop.h b/src/mame/includes/chaknpop.h index 993bf554f75..e0a6f7fa4b2 100644 --- a/src/mame/includes/chaknpop.h +++ b/src/mame/includes/chaknpop.h @@ -8,13 +8,18 @@ class chaknpop_state : public driver_device public: chaknpop_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_gfxdecode(*this, "gfxdecode"), + m_palette(*this, "palette"), m_mcu_ram(*this, "mcu_ram"), m_tx_ram(*this, "tx_ram"), m_attr_ram(*this, "attr_ram"), - m_spr_ram(*this, "spr_ram"), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_spr_ram(*this, "spr_ram") { } + + /* devices */ + required_device m_maincpu; + required_device m_gfxdecode; + required_device m_palette; /* memory pointers */ required_shared_ptr m_mcu_ram; @@ -37,30 +42,31 @@ public: UINT8 m_gfxmode; UINT8 m_flip_x; UINT8 m_flip_y; + DECLARE_WRITE8_MEMBER(coinlock_w); - DECLARE_READ8_MEMBER(chaknpop_mcu_port_a_r); - DECLARE_READ8_MEMBER(chaknpop_mcu_port_b_r); - DECLARE_READ8_MEMBER(chaknpop_mcu_port_c_r); - DECLARE_WRITE8_MEMBER(chaknpop_mcu_port_a_w); - DECLARE_WRITE8_MEMBER(chaknpop_mcu_port_b_w); - DECLARE_WRITE8_MEMBER(chaknpop_mcu_port_c_w); - DECLARE_READ8_MEMBER(chaknpop_gfxmode_r); - DECLARE_WRITE8_MEMBER(chaknpop_gfxmode_w); - DECLARE_WRITE8_MEMBER(chaknpop_txram_w); - DECLARE_WRITE8_MEMBER(chaknpop_attrram_w); + DECLARE_READ8_MEMBER(mcu_port_a_r); + DECLARE_READ8_MEMBER(mcu_port_b_r); + DECLARE_READ8_MEMBER(mcu_port_c_r); + DECLARE_WRITE8_MEMBER(mcu_port_a_w); + DECLARE_WRITE8_MEMBER(mcu_port_b_w); + DECLARE_WRITE8_MEMBER(mcu_port_c_w); + DECLARE_READ8_MEMBER(gfxmode_r); + DECLARE_WRITE8_MEMBER(gfxmode_w); + DECLARE_WRITE8_MEMBER(txram_w); + DECLARE_WRITE8_MEMBER(attrram_w); DECLARE_WRITE8_MEMBER(unknown_port_1_w); DECLARE_WRITE8_MEMBER(unknown_port_2_w); - TILE_GET_INFO_MEMBER(chaknpop_get_tx_tile_info); + TILE_GET_INFO_MEMBER(get_tx_tile_info); + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); DECLARE_PALETTE_INIT(chaknpop); - UINT32 screen_update_chaknpop(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void tx_tilemap_mark_all_dirty(); - void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void draw_bitmap( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void mcu_update_seed( UINT8 data ); - required_device m_maincpu; - required_device m_gfxdecode; - required_device m_palette; + void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); + void draw_bitmap(bitmap_ind16 &bitmap, const rectangle &cliprect); + + void mcu_update_seed(UINT8 data); }; diff --git a/src/mame/machine/chaknpop.c b/src/mame/machine/chaknpop.c index 9e448061eee..3cde92b17e4 100644 --- a/src/mame/machine/chaknpop.c +++ b/src/mame/machine/chaknpop.c @@ -63,27 +63,27 @@ void chaknpop_state::mcu_update_seed( UINT8 data ) Memory handlers ***************************************************************************/ -READ8_MEMBER(chaknpop_state::chaknpop_mcu_port_a_r) +READ8_MEMBER(chaknpop_state::mcu_port_a_r) { //logerror("%04x: MCU port_a read\n", space.device().safe_pc()); return m_mcu_result; } -READ8_MEMBER(chaknpop_state::chaknpop_mcu_port_b_r) +READ8_MEMBER(chaknpop_state::mcu_port_b_r) { //logerror("%04x: MCU port_b read\n", space.device().safe_pc()); return 0xff; } -READ8_MEMBER(chaknpop_state::chaknpop_mcu_port_c_r) +READ8_MEMBER(chaknpop_state::mcu_port_c_r) { //logerror("%04x: MCU port_c read\n", space.device().safe_pc()); return 0x00; } -WRITE8_MEMBER(chaknpop_state::chaknpop_mcu_port_a_w) +WRITE8_MEMBER(chaknpop_state::mcu_port_a_w) { UINT8 mcu_command; @@ -131,12 +131,12 @@ WRITE8_MEMBER(chaknpop_state::chaknpop_mcu_port_a_w) } } -WRITE8_MEMBER(chaknpop_state::chaknpop_mcu_port_b_w) +WRITE8_MEMBER(chaknpop_state::mcu_port_b_w) { //logerror("%04x: MCU port_b write 0x%02x\n", space.device().safe_pc(), data); } -WRITE8_MEMBER(chaknpop_state::chaknpop_mcu_port_c_w) +WRITE8_MEMBER(chaknpop_state::mcu_port_c_w) { //logerror("%04x: MCU port_c write 0x%02x\n", space.device().safe_pc(), data); } diff --git a/src/mame/video/chaknpop.c b/src/mame/video/chaknpop.c index 01b0dec70dd..d36e678ed84 100644 --- a/src/mame/video/chaknpop.c +++ b/src/mame/video/chaknpop.c @@ -25,9 +25,8 @@ PALETTE_INIT_MEMBER(chaknpop_state, chaknpop) { const UINT8 *color_prom = memregion("proms")->base(); - int i; - - for (i = 0; i < 1024; i++) + + for (int i = 0; i < 1024; i++) { int col, r, g, b; int bit0, bit1, bit2; @@ -66,12 +65,12 @@ void chaknpop_state::tx_tilemap_mark_all_dirty() m_tx_tilemap->set_flip(m_flip_x | m_flip_y); } -READ8_MEMBER(chaknpop_state::chaknpop_gfxmode_r) +READ8_MEMBER(chaknpop_state::gfxmode_r) { return m_gfxmode; } -WRITE8_MEMBER(chaknpop_state::chaknpop_gfxmode_w) +WRITE8_MEMBER(chaknpop_state::gfxmode_w) { if (m_gfxmode != data) { @@ -97,13 +96,13 @@ WRITE8_MEMBER(chaknpop_state::chaknpop_gfxmode_w) } } -WRITE8_MEMBER(chaknpop_state::chaknpop_txram_w) +WRITE8_MEMBER(chaknpop_state::txram_w) { m_tx_ram[offset] = data; m_tx_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(chaknpop_state::chaknpop_attrram_w) +WRITE8_MEMBER(chaknpop_state::attrram_w) { if (m_attr_ram[offset] != data) { @@ -123,7 +122,7 @@ WRITE8_MEMBER(chaknpop_state::chaknpop_attrram_w) * I'm not sure how to handle attributes about color */ -TILE_GET_INFO_MEMBER(chaknpop_state::chaknpop_get_tx_tile_info) +TILE_GET_INFO_MEMBER(chaknpop_state::get_tx_tile_info) { int tile = m_tx_ram[tile_index]; int tile_h_bank = (m_gfxmode & GFX_TX_BANK2) << 2; /* 0x00-0xff -> 0x200-0x2ff */ @@ -150,7 +149,7 @@ void chaknpop_state::video_start() UINT8 *RAM = memregion("maincpu")->base(); /* info offset type w h col row */ - m_tx_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(chaknpop_state::chaknpop_get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_tx_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(chaknpop_state::get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); m_vram1 = &RAM[0x10000]; m_vram2 = &RAM[0x12000]; @@ -175,10 +174,8 @@ void chaknpop_state::video_start() void chaknpop_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ) { - int offs; - /* Draw the sprites */ - for (offs = 0; offs < m_spr_ram.bytes(); offs += 4) + for (int offs = 0; offs < m_spr_ram.bytes(); offs += 4) { int sx = m_spr_ram[offs + 3]; int sy = 256 - 15 - m_spr_ram[offs]; @@ -246,7 +243,7 @@ void chaknpop_state::draw_bitmap( bitmap_ind16 &bitmap, const rectangle &cliprec } } -UINT32 chaknpop_state::screen_update_chaknpop(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 chaknpop_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0); draw_sprites(bitmap, cliprect); -- cgit v1.2.3 From ac999d097b3275a91750f98cc54875aba9e97af0 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 12 Feb 2015 21:20:05 +0100 Subject: added timer --- src/emu/cpu/ucom4/ucom4.c | 6 +++++- src/emu/cpu/ucom4/ucom4.h | 2 ++ src/emu/cpu/ucom4/ucom4op.inc | 22 +++++++++++++++++----- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/emu/cpu/ucom4/ucom4.c b/src/emu/cpu/ucom4/ucom4.c index 8c30de7de3f..abc5d017b34 100644 --- a/src/emu/cpu/ucom4/ucom4.c +++ b/src/emu/cpu/ucom4/ucom4.c @@ -10,6 +10,7 @@ I've also looked at asterick's JavaScript D553 emulator for verification, with permission. TODO: + - add external interrupt - what happens with uCOM-43 opcodes on an uCOM-44/45 MCU? - what's the data after the ROM data for? (eg. 2000-2047, official ROM size is 2000) @@ -122,6 +123,8 @@ void ucom4_cpu_device::device_start() m_datamask = (1 << m_datawidth) - 1; m_dph_mask = m_datamask >> 4; + m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ucom4_cpu_device::simple_timer_cb), this)); + m_read_a.resolve_safe(0xf); m_read_b.resolve_safe(0xf); m_read_c.resolve_safe(0xf); @@ -187,11 +190,12 @@ void ucom4_cpu_device::device_start() void ucom4_cpu_device::device_reset() { - m_inte_f = 1; m_pc = 0; m_op = 0; m_skip = false; + m_timer->adjust(attotime::never); + // clear i/o for (int i = NEC_UCOM4_PORTC; i <= NEC_UCOM4_PORTI; i++) output_w(i, 0xf); diff --git a/src/emu/cpu/ucom4/ucom4.h b/src/emu/cpu/ucom4/ucom4.h index 92b73e1e270..718937b235a 100644 --- a/src/emu/cpu/ucom4/ucom4.h +++ b/src/emu/cpu/ucom4/ucom4.h @@ -141,6 +141,7 @@ protected: UINT8 m_bitmask; // opcode bit argument bool m_skip; // skip next opcode int m_icount; + emu_timer *m_timer; UINT16 m_pc; // program counter UINT8 m_acc; // 4-bit accumulator @@ -179,6 +180,7 @@ protected: void output_w(int index, UINT8 data); bool check_op_43(); + TIMER_CALLBACK_MEMBER( simple_timer_cb ); UINT8 ucom43_reg_r(int index); void ucom43_reg_w(int index, UINT8 data); diff --git a/src/emu/cpu/ucom4/ucom4op.inc b/src/emu/cpu/ucom4/ucom4op.inc index 6c6faddeae5..82d54950e24 100644 --- a/src/emu/cpu/ucom4/ucom4op.inc +++ b/src/emu/cpu/ucom4/ucom4op.inc @@ -429,7 +429,8 @@ void ucom4_cpu_device::op_tpb() void ucom4_cpu_device::op_tit() { // TIT: skip next on Interrupt F/F, reset Interrupt F/F - op_illegal(); + m_skip = (m_int_f != 0); + m_int_f = 0; } @@ -489,6 +490,11 @@ inline bool ucom4_cpu_device::check_op_43() return (m_family == NEC_UCOM43); } +TIMER_CALLBACK_MEMBER( ucom4_cpu_device::simple_timer_cb ) +{ + m_timer_f = 1; +} + // extra registers reside in RAM enum { @@ -512,6 +518,7 @@ inline void ucom4_cpu_device::ucom43_reg_w(int index, UINT8 data) } + // Transfer void ucom4_cpu_device::op_taw() @@ -712,7 +719,12 @@ void ucom4_cpu_device::op_stm() if (!check_op_43()) return; // STM X: Reset Timer F/F, Start Timer with X - op_illegal(); + m_timer_f = 0; + + // on the default clockrate of 400kHz, the minimum time interval is + // 630usec and the maximum interval is 40320usec(630*64) + attotime base = attotime::from_hz(unscaled_clock() / 4 / 63); + m_timer->adjust(base * ((m_arg & 0x3f) + 1)); if ((m_arg & 0xc0) != 0x80) logerror("%s STM opcode unexpected upper arg $%02X at $%03X\n", tag(), m_arg & 0xc0, m_pc); @@ -723,7 +735,7 @@ void ucom4_cpu_device::op_ttm() if (!check_op_43()) return; // TTM: skip next on Timer F/F - op_illegal(); + m_skip = (m_timer_f != 0); } @@ -734,7 +746,7 @@ void ucom4_cpu_device::op_ei() if (!check_op_43()) return; // EI: Set Interrupt Enable F/F - op_illegal(); + m_inte_f = 1; } void ucom4_cpu_device::op_di() @@ -742,5 +754,5 @@ void ucom4_cpu_device::op_di() if (!check_op_43()) return; // DI: Reset Interrupt Enable F/F - op_illegal(); + m_inte_f = 0; } -- cgit v1.2.3 From c120b3df506540f47b7b8faf8fa9862a5fd139f3 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 12 Feb 2015 21:33:56 +0100 Subject: don't clear stack on pop --- src/emu/cpu/amis2000/amis2000.h | 2 +- src/emu/cpu/amis2000/amis2000op.inc | 5 +---- src/emu/cpu/ucom4/ucom4.h | 2 +- src/emu/cpu/ucom4/ucom4op.inc | 5 +---- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/emu/cpu/amis2000/amis2000.h b/src/emu/cpu/amis2000/amis2000.h index 99ee23edb6f..2d70b6c887b 100644 --- a/src/emu/cpu/amis2000/amis2000.h +++ b/src/emu/cpu/amis2000/amis2000.h @@ -77,7 +77,7 @@ protected: UINT8 m_callstack_bits; // number of program counter bits held in callstack UINT16 m_callstack_mask; UINT8 m_callstack_depth; // callstack levels: 3 on 2000/2150, 5 on 2200/2400 - UINT16 m_callstack[5+1]; // max 5 + UINT16 m_callstack[5]; // max 5 int m_icount; UINT16 m_pc; // 13-bit program counter UINT8 m_ppr; // prepared page register (PP 1) diff --git a/src/emu/cpu/amis2000/amis2000op.inc b/src/emu/cpu/amis2000/amis2000op.inc index d211f5dac38..5859516124c 100644 --- a/src/emu/cpu/amis2000/amis2000op.inc +++ b/src/emu/cpu/amis2000/amis2000op.inc @@ -17,11 +17,8 @@ inline void amis2000_device::ram_w(UINT8 data) void amis2000_device::pop_callstack() { m_pc = (m_pc & ~m_callstack_mask) | (m_callstack[0] & m_callstack_mask); - for (int i = 0; i < m_callstack_depth; i++) - { + for (int i = 0; i < m_callstack_depth-1; i++) m_callstack[i] = m_callstack[i+1]; - m_callstack[i+1] = 0; - } } void amis2000_device::push_callstack() diff --git a/src/emu/cpu/ucom4/ucom4.h b/src/emu/cpu/ucom4/ucom4.h index 718937b235a..8535b57df99 100644 --- a/src/emu/cpu/ucom4/ucom4.h +++ b/src/emu/cpu/ucom4/ucom4.h @@ -133,7 +133,7 @@ protected: int m_datamask; int m_family; // MCU family (43/44/45) int m_stack_levels; // number of callstack levels - UINT16 m_stack[3+1]; // max 3 + UINT16 m_stack[3]; // max 3 UINT8 m_port_out[0x10]; // last value written to output port UINT8 m_op; UINT8 m_prev_op; // previous opcode diff --git a/src/emu/cpu/ucom4/ucom4op.inc b/src/emu/cpu/ucom4/ucom4op.inc index 82d54950e24..8de834438b5 100644 --- a/src/emu/cpu/ucom4/ucom4op.inc +++ b/src/emu/cpu/ucom4/ucom4op.inc @@ -17,11 +17,8 @@ inline void ucom4_cpu_device::ram_w(UINT8 data) void ucom4_cpu_device::pop_stack() { m_pc = m_stack[0] & m_prgmask; - for (int i = 0; i < m_stack_levels; i++) - { + for (int i = 0; i < m_stack_levels-1; i++) m_stack[i] = m_stack[i+1]; - m_stack[i+1] = 0; - } } void ucom4_cpu_device::push_stack() -- cgit v1.2.3 From e1d0a45ffc063b6a50e104639ffff9e858c17941 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 13 Feb 2015 02:09:37 +0100 Subject: (MESS)New Working Game Added ---------------------- Tomy Tennis [hap, Kevin Horton] --- src/mess/drivers/tmtennis.c | 79 ++++++++++++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 30 deletions(-) diff --git a/src/mess/drivers/tmtennis.c b/src/mess/drivers/tmtennis.c index 61899c33c43..e4a77d591d9 100644 --- a/src/mess/drivers/tmtennis.c +++ b/src/mess/drivers/tmtennis.c @@ -9,12 +9,12 @@ The initial release of this game was in 1979, known as Pro-Tennis, it is unknown if the hardware and/or ROM contents differ. - - TODO: - - 2-player mode doesn't work: the guys auto-serve and the left player - always hits the net, mcu emulation bug? - - difficulty switch changes mcu freq + This is an early VFD simple electronic tennis game. Player 1 is on the right + side, player 2 or CPU on the left. Each player has six possible positions + where to hit the ball. A backdrop behind the VFD shows a tennis court. + + NOTE!: MESS external artwork is required to be able to play ***************************************************************************/ @@ -24,11 +24,6 @@ #include "tmtennis.lh" // this is a test layout, external artwork is necessary -// master clock is from an LC circuit oscillating by default at 360kHz, -// the difficulty switch puts a capacitor across it to slow it down to 260kHz -#define MASTER_CLOCK_PRO1 (260000) -#define MASTER_CLOCK_PRO2 (360000) - class tmtennis_state : public driver_device { @@ -53,12 +48,26 @@ public: DECLARE_WRITE8_MEMBER(plate_w); DECLARE_WRITE8_MEMBER(grid_w); + DECLARE_INPUT_CHANGED_MEMBER(difficulty_switch); + void update_clock(); + UINT16 m_vfd_state[0x10]; void update_vfd(); + virtual void machine_reset(); virtual void machine_start(); }; +// master clock is from an LC circuit oscillating by default at 360kHz, but... +#define MASTER_CLOCK (360000) + +void tmtennis_state::update_clock() +{ + // ...on PRO1, the difficulty switch puts a capacitor across the LC circuit + // to slow it down to approx. 260kHz (28%) + m_maincpu->set_clock_scale(m_button_matrix[1]->read() & 0x100 ? 0.72 : 1); +} + /*************************************************************************** @@ -95,7 +104,7 @@ READ8_MEMBER(tmtennis_state::input_r) // read selected button rows for (int i = 0; i < 2; i++) - if (~m_input_mux >> i & 1) + if (m_input_mux >> i & 1) inp &= m_button_matrix[i]->read(); return inp >> (offset*4); @@ -137,6 +146,11 @@ WRITE8_MEMBER(tmtennis_state::grid_w) ***************************************************************************/ +INPUT_CHANGED_MEMBER(tmtennis_state::difficulty_switch) +{ + update_clock(); +} + /* Pro-Tennis physical button layout and labels is like this: [SERVE] [1] [2] [3] [3] [2] [1] [SERVE] @@ -146,30 +160,30 @@ WRITE8_MEMBER(tmtennis_state::grid_w) */ static INPUT_PORTS_START( tmtennis ) - PORT_START("IN.0") // E0 port A/B (left side) - PORT_CONFNAME( 0x101, 0x001, DEF_STR( Difficulty ) ) + PORT_START("IN.0") // E0 port A/B + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("P1 Serve") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("P2 Serve") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON6 ) + + PORT_START("IN.1") // E1 port A/B + PORT_CONFNAME( 0x101, 0x101, DEF_STR( Difficulty ) ) PORT_CHANGED_MEMBER(DEVICE_SELF, tmtennis_state, difficulty_switch, NULL) PORT_CONFSETTING( 0x000, "Practice" ) - PORT_CONFSETTING( 0x001, "Pro 1" ) - PORT_CONFSETTING( 0x101, "Pro 2" ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) // P2 serve + PORT_CONFSETTING( 0x101, "Pro 1" ) // -> difficulty_switch + PORT_CONFSETTING( 0x001, "Pro 2" ) + PORT_CONFNAME( 0x02, 0x02, "Players" ) + PORT_CONFSETTING( 0x02, "1" ) + PORT_CONFSETTING( 0x00, "2" ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) - - PORT_START("IN.1") // E1 port A/B (right side) - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) // P1 serve - PORT_CONFNAME( 0x02, 0x02, "Players" ) - PORT_CONFSETTING( 0x02, "1" ) - PORT_CONFSETTING( 0x00, "2" ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON6 ) INPUT_PORTS_END @@ -180,6 +194,11 @@ INPUT_PORTS_END ***************************************************************************/ +void tmtennis_state::machine_reset() +{ + update_clock(); +} + void tmtennis_state::machine_start() { // zerofill @@ -199,7 +218,7 @@ void tmtennis_state::machine_start() static MACHINE_CONFIG_START( tmtennis, tmtennis_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", NEC_D552, MASTER_CLOCK_PRO2) + MCFG_CPU_ADD("maincpu", NEC_D552, MASTER_CLOCK) MCFG_UCOM4_READ_A_CB(READ8(tmtennis_state, input_r)) MCFG_UCOM4_READ_B_CB(READ8(tmtennis_state, input_r)) MCFG_UCOM4_WRITE_C_CB(WRITE8(tmtennis_state, plate_w)) @@ -234,4 +253,4 @@ ROM_START( tmtennis ) ROM_END -CONS( 1980, tmtennis, 0, 0, tmtennis, tmtennis, driver_device, 0, "Tomy", "Tennis (Tomytronic)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) +CONS( 1980, tmtennis, 0, 0, tmtennis, tmtennis, driver_device, 0, "Tomy", "Tennis (Tomytronic)", GAME_SUPPORTS_SAVE ) -- cgit v1.2.3 From 32373975f12c0bae9fe7dee05878011760f9b0cb Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 13 Feb 2015 14:03:02 +1100 Subject: (MESS) mbee: various cleanups and notes (nw) --- src/mess/drivers/mbee.c | 181 ++++++++++++++++++--------------------------- src/mess/includes/mbee.h | 57 ++++---------- src/mess/machine/mbee.c | 73 +++++++++--------- src/mess/video/mbee.c | 189 +++++++++++++++-------------------------------- 4 files changed, 185 insertions(+), 315 deletions(-) diff --git a/src/mess/drivers/mbee.c b/src/mess/drivers/mbee.c index c386e94a717..5b5395b51ae 100644 --- a/src/mess/drivers/mbee.c +++ b/src/mess/drivers/mbee.c @@ -30,31 +30,6 @@ - Although certain models came with particular drives as standard, users could add the other size if they wished. We support both sizes on any model. - Microbee Standard / Plus memory map - - 0000-7FFF RAM - 8000-BFFF SYSTEM roms - C000-DFFF Edasm or WBee (edasm.rom or wbeee12.rom, optional) - E000-EFFF Telcom 1.2 (netrom.ic34; optional) - F000-F7FF Video RAM - F800-FFFF PCG RAM (graphics) - - Microbee IC memory map (preliminary) - - 0000-7FFF RAM - 8000-BFFF SYSTEM roms (bas522a.rom, bas522b.rom) - C000-DFFF Edasm or WBee (edasm.rom or wbeee12.rom, optional) - E000-EFFF Telcom (optional) - F000-F7FF Video RAM - F800-FFFF PCG RAM (graphics), Colour RAM (banked) - - Microbee 56KB ROM memory map (preliminary) - - 0000-DFFF RAM - E000-EFFF ROM 56kb.rom CP/M bootstrap loader - F000-F7FF Video RAM - F800-FFFF PCG RAM (graphics), Colour RAM (banked) - Early machines have 'standard' video (128 hires characters). Later machines had the option of 'premium' video which provides thousands of hires characters, enough to simulate @@ -65,7 +40,7 @@ This rom can be replaced with the Dreamdisk Chip-8 rom. Note that Telcom 3.21 is 8k, it uses a rombank switch (by reading port 0A) to swap between the two halves. - See Telcom notes below. + See Telcom notes below. EDASM - Jump to C000, usually the Editor/Assembler package. @@ -75,7 +50,6 @@ These early colour computers have a PROM to create the foreground palette. - Notes about the printer: - When computer turned on, defaults to 1200 baud serial printer - Change it to parallel by entering OUTL#1 @@ -96,24 +70,44 @@ - Telcom 1.2 (used in mbeeic) has a bug. If you enter NET CLOCK, the status line is filled with inverse K. You can fix this from Basic by doing NET CLOCK 3 times. + Notes about Disk System + - Ports 44 to 47 are for standard connection to FD2793. + - Port 48 is used for drive/side/density select on write, and intrq/drq on read. + intrq and drq are OR'd together, then gated to bit 7 of the data bus whenever + port 48 is activated on read. There are no interrupts used. + + Tests of old keyboard. Start mbeeic. + 1. Load ASTEROIDS PLUS, stay in attract mode, hold down spacebar, + it should only fire bullets. If it sometimes starts turning, + thrusting or using the shield, then there is a problem. + + 2. Load SCAVENGER and make sure it doesn't go to the next level + until you find the Exit. + + 3. At the Basic prompt, type in EDASM press enter. At the memory size + prompt press enter. Now, make sure the keyboard works properly. + *************************************************************************** TODO/not working: - Printer needs to be understood and fixed. - - Keyboard loses characters if you type at a normal rate. - - Fix Paste (it loses most of the characters) + + - 256tc: Paste ignores shift key + - All others: Paste drops most characters, shift operates randomly. - various fdc issues: - B drive doesn't work. - some disks cause MESS to freeze. - ENMF pin missing from wd_fdc. - incorrect timing for track register causes 256tc failure to boot a disk. - - 56k model takes about 2 minutes to boot a disk if loaded via command line. - + - 56k model takes 120 seconds to boot a disk if loaded via command line. + + - mbeeppc, mbee128p: In Basic, keyboard loses characters. Works fine in Wordbee. + - 256tc: At the menu, if F2 pressed to activate the Monitor, the emulated machine crashes due to a bug in z80pio emulation. - + - 256tc: Keyboard ROM U60 needs to be dumped. - 128k: GOLD PAL needs to be dumped for the bankswitching. - 64k: RED PAL needs to be dumped for the bankswitching. @@ -125,25 +119,13 @@ - Mouse: a few programs support the use of a serial mouse which interfaced directly to the Z80PIO. However there's little info to be found. + PIO B3 to ground activates the mouse pointer in Shell v3.01. -*************************************************************************** - - Description of Disk System - - - Ports 44 to 47 are for standard connection to FD2793. - - Port 48 is used for drive/side/density select on write, - and intrq/drq on read. - intrq and drq are OR'd together, then gated to bit 7 of the - data bus whenever port 48 is activated on read. There are - no interrupts used. - -****************************************************************************/ - +*******************************************************************************/ #include "includes/mbee.h" #include "formats/mbee_cas.h" - #define XTAL_13_5MHz 13500000 /********** NOTE !!! *********************************************************** @@ -156,7 +138,7 @@ static ADDRESS_MAP_START(mbee_mem, AS_PROGRAM, 8, mbee_state) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0000, 0x0fff) AM_RAMBANK("boot") AM_RANGE(0x1000, 0x3fff) AM_RAM - AM_RANGE(0x4000, 0x7fff) AM_WRITENOP /* Needed because quickload to here will crash MESS otherwise */ + AM_RANGE(0x4000, 0x7fff) AM_WRITENOP // Needed because quickload to here will crash MESS AM_RANGE(0x8000, 0xefff) AM_ROM AM_RANGE(0xf000, 0xf7ff) AM_READWRITE(mbee_low_r, mbee_low_w) AM_RANGE(0xf800, 0xffff) AM_READWRITE(mbee_high_r, mbee_high_w) @@ -312,6 +294,9 @@ static ADDRESS_MAP_START(mbee128_io, AS_IO, 8, mbee_state) ADDRESS_MAP_GLOBAL_MASK(0xff) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x00, 0x03) AM_DEVREADWRITE("z80pio", z80pio_device, read_alt, write_alt) + AM_RANGE(0x04, 0x04) AM_WRITE(mbee_04_w) + AM_RANGE(0x06, 0x06) AM_WRITE(mbee_06_w) + AM_RANGE(0x07, 0x07) AM_READ(mbee_07_r) AM_RANGE(0x08, 0x08) AM_READWRITE(mbeeic_08_r, mbeeic_08_w) AM_RANGE(0x0b, 0x0b) AM_READWRITE(mbee_0b_r, mbee_0b_w) AM_RANGE(0x0c, 0x0c) AM_READWRITE(m6545_status_r, m6545_index_w) @@ -363,7 +348,7 @@ static ADDRESS_MAP_START(mbeett_io, AS_IO, 8, mbee_state) ADDRESS_MAP_END static INPUT_PORTS_START( mbee ) - PORT_START("X0") /* IN0 KEY ROW 0 [000] */ + PORT_START("X.0") /* IN0 KEY ROW 0 [000] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("@") PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('@') PORT_CHAR('`') PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') PORT_CHAR(0x01) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') PORT_CHAR(0x02) @@ -373,7 +358,7 @@ static INPUT_PORTS_START( mbee ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') PORT_CHAR(0x06) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') PORT_CHAR(0x07) - PORT_START("X1") /* IN1 KEY ROW 1 [080] */ + PORT_START("X.1") /* IN1 KEY ROW 1 [080] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') PORT_CHAR(0x08) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') PORT_CHAR(0x09) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') PORT_CHAR(0x0a) @@ -383,7 +368,7 @@ static INPUT_PORTS_START( mbee ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') PORT_CHAR(0x0e) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') PORT_CHAR(0x0f) - PORT_START("X2") /* IN2 KEY ROW 2 [100] */ + PORT_START("X.2") /* IN2 KEY ROW 2 [100] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') PORT_CHAR(0x10) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') PORT_CHAR(0x11) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') PORT_CHAR(0x12) @@ -393,7 +378,7 @@ static INPUT_PORTS_START( mbee ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') PORT_CHAR(0x16) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') PORT_CHAR(0x17) - PORT_START("X3") /* IN3 KEY ROW 3 [180] */ + PORT_START("X.3") /* IN3 KEY ROW 3 [180] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_CHAR(0x18) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('u') PORT_CHAR('Y') PORT_CHAR(0x19) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') PORT_CHAR(0x1a) @@ -403,7 +388,7 @@ static INPUT_PORTS_START( mbee ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("^") PORT_CODE(KEYCODE_TILDE) PORT_CHAR('^') PORT_CHAR('~') PORT_CHAR(0x1e) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Delete") PORT_CODE(KEYCODE_DEL) PORT_CHAR(8) PORT_CHAR(0x5f) PORT_CHAR(0x1f) // port_char not working - hijacked - PORT_START("X4") /* IN4 KEY ROW 4 [200] */ + PORT_START("X.4") /* IN4 KEY ROW 4 [200] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("1 !") PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("2 \"") PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"') @@ -413,7 +398,7 @@ static INPUT_PORTS_START( mbee ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("6 &") PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("7 '") PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') - PORT_START("X5") /* IN5 KEY ROW 5 [280] */ + PORT_START("X.5") /* IN5 KEY ROW 5 [280] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("8 (") PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("9 )") PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("; +") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') @@ -423,7 +408,7 @@ static INPUT_PORTS_START( mbee ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(". >") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("/ ?") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') - PORT_START("X6") /* IN6 KEY ROW 6 [300] */ + PORT_START("X.6") /* IN6 KEY ROW 6 [300] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Escape") PORT_CODE(KEYCODE_ESC) PORT_CHAR(27) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) PORT_CHAR(9) @@ -433,7 +418,7 @@ static INPUT_PORTS_START( mbee ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Break") PORT_CODE(KEYCODE_END) PORT_CHAR(3) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') - PORT_START("X7") /* IN7 KEY ROW 7 [380] */ + PORT_START("X.7") /* IN7 KEY ROW 7 [380] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Up)") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Down)") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) @@ -465,7 +450,7 @@ static INPUT_PORTS_START( mbee ) INPUT_PORTS_END static INPUT_PORTS_START( mbee256 ) - PORT_START("X0") /* IN0 KEY ROW 0 [+00] */ + PORT_START("Y.0") /* IN0 KEY ROW 0 [+00] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Escape") PORT_CODE(KEYCODE_ESC) PORT_CHAR(27) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) PORT_CHAR(9) @@ -474,7 +459,7 @@ static INPUT_PORTS_START( mbee256 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("DEL (num)") PORT_CODE(KEYCODE_DEL_PAD) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') - PORT_START("X1") /* IN1 KEY ROW 1 [+08] */ + PORT_START("Y.1") /* IN1 KEY ROW 1 [+08] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("1 !") PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') PORT_CHAR(0x11) @@ -483,7 +468,7 @@ static INPUT_PORTS_START( mbee256 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Linefeed") PORT_CODE(KEYCODE_HOME) PORT_CHAR(10) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Insert") PORT_CODE(KEYCODE_INSERT) - PORT_START("X2") /* IN2 KEY ROW 2 [+10] */ + PORT_START("Y.2") /* IN2 KEY ROW 2 [+10] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("2 @") PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') PORT_CHAR(0x17) @@ -493,7 +478,7 @@ static INPUT_PORTS_START( mbee256 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("3 (num)") PORT_CODE(KEYCODE_3_PAD) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') PORT_CHAR(0x1a) - PORT_START("X3") /* IN3 KEY ROW 3 [+18] */ + PORT_START("Y.3") /* IN3 KEY ROW 3 [+18] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("3 #") PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') PORT_CHAR(0x05) @@ -503,7 +488,7 @@ static INPUT_PORTS_START( mbee256 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("6 (num)") PORT_CODE(KEYCODE_6_PAD) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_CHAR(0x18) - PORT_START("X4") /* IN4 KEY ROW 4 [+20] */ + PORT_START("Y.4") /* IN4 KEY ROW 4 [+20] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("4 $") PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') PORT_CHAR(0x12) @@ -513,7 +498,7 @@ static INPUT_PORTS_START( mbee256 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("9 (num)") PORT_CODE(KEYCODE_9_PAD) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') PORT_CHAR(0x03) - PORT_START("X5") /* IN5 KEY ROW 5 [+28] */ + PORT_START("Y.5") /* IN5 KEY ROW 5 [+28] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F6") PORT_CODE(KEYCODE_F6) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("5 %") PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') PORT_CHAR(0x14) @@ -523,7 +508,7 @@ static INPUT_PORTS_START( mbee256 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("4 (num)") PORT_CODE(KEYCODE_4_PAD) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') PORT_CHAR(0x16) - PORT_START("X6") /* IN6 KEY ROW 6 [+30] */ + PORT_START("Y.6") /* IN6 KEY ROW 6 [+30] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F7") PORT_CODE(KEYCODE_F7) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("6 &") PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') PORT_CHAR(0x19) @@ -533,7 +518,7 @@ static INPUT_PORTS_START( mbee256 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Right)") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') PORT_CHAR(0x02) - PORT_START("X7") /* IN7 KEY ROW 7 [+38] */ + PORT_START("Y.7") /* IN7 KEY ROW 7 [+38] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F8") PORT_CODE(KEYCODE_F8) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("7 &") PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') PORT_CHAR(0x15) @@ -541,7 +526,7 @@ static INPUT_PORTS_START( mbee256 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Left)") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') PORT_CHAR(0x0e) - PORT_START("X8") /* IN0 KEY ROW 0 [+40] */ + PORT_START("Y.8") /* IN0 KEY ROW 0 [+40] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F9") PORT_CODE(KEYCODE_F9) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("8 *") PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') PORT_CHAR(0x09) @@ -549,7 +534,7 @@ static INPUT_PORTS_START( mbee256 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Up)") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') PORT_CHAR(0x0d) - PORT_START("X9") /* IN1 KEY ROW 1 [+48] */ + PORT_START("Y.9") /* IN1 KEY ROW 1 [+48] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F10") PORT_CODE(KEYCODE_F10) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("9 (") PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') PORT_CHAR(0x0f) @@ -558,7 +543,7 @@ static INPUT_PORTS_START( mbee256 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(13) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(", <") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') - PORT_START("X10") /* IN2 KEY ROW 2 [+50] */ + PORT_START("Y.10") /* IN2 KEY ROW 2 [+50] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F11") PORT_CODE(KEYCODE_F11) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("0 )") PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') PORT_CHAR(0x10) @@ -568,7 +553,7 @@ static INPUT_PORTS_START( mbee256 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\\ |") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') PORT_CHAR(0x1c) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(". >") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') - PORT_START("X11") /* IN3 KEY ROW 3 [+58] */ + PORT_START("Y.11") /* IN3 KEY ROW 3 [+58] */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F12") PORT_CODE(KEYCODE_F12) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("[ {") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') PORT_CHAR(0x1b) @@ -577,13 +562,13 @@ static INPUT_PORTS_START( mbee256 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("] }") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') PORT_CHAR(0x1d) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("/ ?") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') - PORT_START("X12") /* IN4 KEY ROW 4 [+60] */ + PORT_START("Y.12") /* IN4 KEY ROW 4 [+60] */ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) - PORT_START("X13") /* IN5 KEY ROW 5 [+68] */ + PORT_START("Y.13") /* IN5 KEY ROW 5 [+68] */ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2) - PORT_START("X14") /* IN6 KEY ROW 6 [+70] */ + PORT_START("Y.14") /* IN6 KEY ROW 6 [+70] */ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Alt") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) // Autorun on quickload @@ -619,15 +604,15 @@ static const gfx_layout mbee_charlayout = 8*16 /* every char takes 16 bytes */ }; -static GFXDECODE_START( mbee ) +static GFXDECODE_START( mono ) GFXDECODE_ENTRY( "gfx", 0x0000, mbee_charlayout, 0, 1 ) GFXDECODE_END -static GFXDECODE_START( mbeeic ) +static GFXDECODE_START( standard ) GFXDECODE_ENTRY( "gfx", 0x0000, mbee_charlayout, 0, 48 ) GFXDECODE_END -static GFXDECODE_START( mbeeppc ) +static GFXDECODE_START( premium ) GFXDECODE_ENTRY( "gfx", 0x0000, mbee_charlayout, 0, 8 ) GFXDECODE_END @@ -662,10 +647,10 @@ static MACHINE_CONFIG_START( mbee, mbee_state ) MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0, 19*16-1) MCFG_SCREEN_UPDATE_DRIVER(mbee_state, screen_update_mbee) - MCFG_GFXDECODE_ADD("gfxdecode", "palette", mbee) + MCFG_GFXDECODE_ADD("gfxdecode", "palette", mono) MCFG_PALETTE_ADD_MONOCHROME_AMBER("palette") // usually sold with amber or green monitor - MCFG_VIDEO_START_OVERRIDE(mbee_state, mbee) + MCFG_VIDEO_START_OVERRIDE(mbee_state, mono) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -678,8 +663,8 @@ static MACHINE_CONFIG_START( mbee, mbee_state ) MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_12MHz / 8) MCFG_MC6845_SHOW_BORDER_AREA(false) MCFG_MC6845_CHAR_WIDTH(8) - MCFG_MC6845_UPDATE_ROW_CB(mbee_state, mbee_update_row) - MCFG_MC6845_ADDR_CHANGED_CB(mbee_state, mbee_update_addr) + MCFG_MC6845_UPDATE_ROW_CB(mbee_state, mono_update_row) + MCFG_MC6845_ADDR_CHANGED_CB(mbee_state, crtc_update_addr) MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(mbee_state, crtc_vs)) MCFG_QUICKLOAD_ADD("quickload", mbee_state, mbee, "mwb,com,bee", 2) @@ -718,12 +703,12 @@ static MACHINE_CONFIG_START( mbeeic, mbee_state ) MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 19*16-1) MCFG_SCREEN_UPDATE_DRIVER(mbee_state, screen_update_mbee) - MCFG_GFXDECODE_ADD("gfxdecode", "palette", mbeeic) + MCFG_GFXDECODE_ADD("gfxdecode", "palette", standard) MCFG_PALETTE_ADD("palette", 96) - MCFG_PALETTE_INIT_OWNER(mbee_state, mbeeic) + MCFG_PALETTE_INIT_OWNER(mbee_state, standard) - MCFG_VIDEO_START_OVERRIDE(mbee_state, mbeeic) + MCFG_VIDEO_START_OVERRIDE(mbee_state, standard) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -736,8 +721,8 @@ static MACHINE_CONFIG_START( mbeeic, mbee_state ) MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_13_5MHz / 8) MCFG_MC6845_SHOW_BORDER_AREA(false) MCFG_MC6845_CHAR_WIDTH(8) - MCFG_MC6845_UPDATE_ROW_CB(mbee_state, mbeeic_update_row) - MCFG_MC6845_ADDR_CHANGED_CB(mbee_state, mbee_update_addr) + MCFG_MC6845_UPDATE_ROW_CB(mbee_state, colour_update_row) + MCFG_MC6845_ADDR_CHANGED_CB(mbee_state, crtc_update_addr) MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(mbee_state, crtc_vs)) MCFG_QUICKLOAD_ADD("quickload", mbee_state, mbee, "mwb,com,bee", 2) @@ -773,19 +758,11 @@ static MACHINE_CONFIG_DERIVED( mbeeppc, mbeeic ) MCFG_CPU_MODIFY( "maincpu" ) MCFG_CPU_PROGRAM_MAP(mbeeppc_mem) MCFG_CPU_IO_MAP(mbeeppc_io) - MCFG_VIDEO_START_OVERRIDE(mbee_state, mbeeppc) - MCFG_GFXDECODE_MODIFY("gfxdecode", mbeeppc) + MCFG_VIDEO_START_OVERRIDE(mbee_state, premium) + MCFG_GFXDECODE_MODIFY("gfxdecode", premium) MCFG_PALETTE_MODIFY("palette") MCFG_PALETTE_ENTRIES(16) - MCFG_PALETTE_INIT_OWNER(mbee_state, mbeeppc) - - MCFG_DEVICE_REMOVE("crtc") - MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_13_5MHz / 8) - MCFG_MC6845_SHOW_BORDER_AREA(false) - MCFG_MC6845_CHAR_WIDTH(8) - MCFG_MC6845_UPDATE_ROW_CB(mbee_state, mbeeppc_update_row) - MCFG_MC6845_ADDR_CHANGED_CB(mbee_state, mbee_update_addr) - MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(mbee_state, crtc_vs)) + MCFG_PALETTE_INIT_OWNER(mbee_state, premium) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( mbee56, mbeeic ) @@ -805,6 +782,7 @@ static MACHINE_CONFIG_DERIVED( mbee128, mbee56 ) MCFG_CPU_PROGRAM_MAP(mbee256_mem) MCFG_CPU_IO_MAP(mbee128_io) MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee128) + MCFG_MC146818_ADD( "rtc", XTAL_32_768kHz ) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( mbee128p, mbeeppc ) @@ -812,6 +790,7 @@ static MACHINE_CONFIG_DERIVED( mbee128p, mbeeppc ) MCFG_CPU_PROGRAM_MAP(mbee256_mem) MCFG_CPU_IO_MAP(mbee128_io) MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee128) + MCFG_MC146818_ADD( "rtc", XTAL_32_768kHz ) MCFG_WD2793x_ADD("fdc", XTAL_4MHz / 4) MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(mbee_state, fdc_intrq_w)) MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(mbee_state, fdc_drq_w)) @@ -824,14 +803,7 @@ static MACHINE_CONFIG_DERIVED( mbee256, mbee128p ) MCFG_CPU_PROGRAM_MAP(mbee256_mem) MCFG_CPU_IO_MAP(mbee256_io) MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee256) - MCFG_MC146818_ADD( "rtc", XTAL_32_768kHz ) - MCFG_DEVICE_REMOVE("crtc") - MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_13_5MHz / 8) - MCFG_MC6845_SHOW_BORDER_AREA(false) - MCFG_MC6845_CHAR_WIDTH(8) - MCFG_MC6845_UPDATE_ROW_CB(mbee_state, mbeeppc_update_row) - MCFG_MC6845_ADDR_CHANGED_CB(mbee_state, mbee256_update_addr) MCFG_DEVICE_REMOVE("fdc:0") MCFG_DEVICE_REMOVE("fdc:1") MCFG_FLOPPY_DRIVE_ADD("fdc:0", mbee_floppies, "drive3a", floppy_image_device::default_floppy_formats) @@ -842,15 +814,8 @@ static MACHINE_CONFIG_DERIVED( mbeett, mbeeppc ) MCFG_CPU_MODIFY( "maincpu" ) MCFG_CPU_PROGRAM_MAP(mbeett_mem) MCFG_CPU_IO_MAP(mbeett_io) - MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbeett ) + MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbeett) MCFG_MC146818_ADD( "rtc", XTAL_32_768kHz ) - - MCFG_DEVICE_REMOVE("crtc") - MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_13_5MHz / 8) - MCFG_MC6845_SHOW_BORDER_AREA(false) - MCFG_MC6845_CHAR_WIDTH(8) - MCFG_MC6845_UPDATE_ROW_CB(mbee_state, mbeeppc_update_row) - MCFG_MC6845_ADDR_CHANGED_CB(mbee_state, mbee256_update_addr) MACHINE_CONFIG_END /* Unused roms: diff --git a/src/mess/includes/mbee.h b/src/mess/includes/mbee.h index 64a51b92446..81a3327164c 100644 --- a/src/mess/includes/mbee.h +++ b/src/mess/includes/mbee.h @@ -52,23 +52,10 @@ public: , m_pak(*this, "pak") , m_telcom(*this, "telcom") , m_basic(*this, "basic") - , m_io_x0(*this, "X0") - , m_io_x1(*this, "X1") - , m_io_x2(*this, "X2") - , m_io_x3(*this, "X3") - , m_io_x4(*this, "X4") - , m_io_x5(*this, "X5") - , m_io_x6(*this, "X6") - , m_io_x7(*this, "X7") , m_io_extra(*this, "EXTRA") , m_io_config(*this, "CONFIG") - , m_io_x8(*this, "X8") - , m_io_x9(*this, "X9") - , m_io_x10(*this, "X10") - , m_io_x11(*this, "X11") - , m_io_x12(*this, "X12") - , m_io_x13(*this, "X13") - , m_io_x14(*this, "X14") + , m_io_oldkb(*this, "X") + , m_io_newkb(*this, "Y") , m_screen(*this, "screen") { } @@ -123,12 +110,12 @@ public: DECLARE_DRIVER_INIT(mbeeic); DECLARE_DRIVER_INIT(mbee128); DECLARE_MACHINE_RESET(mbee); - DECLARE_VIDEO_START(mbee); - DECLARE_VIDEO_START(mbeeic); - DECLARE_PALETTE_INIT(mbeeic); + DECLARE_VIDEO_START(mono); + DECLARE_VIDEO_START(standard); + DECLARE_VIDEO_START(premium); + DECLARE_PALETTE_INIT(standard); DECLARE_PALETTE_INIT(mbeepc85b); - DECLARE_VIDEO_START(mbeeppc); - DECLARE_PALETTE_INIT(mbeeppc); + DECLARE_PALETTE_INIT(premium); DECLARE_MACHINE_RESET(mbee56); DECLARE_MACHINE_RESET(mbee128); DECLARE_MACHINE_RESET(mbee256); @@ -152,19 +139,18 @@ public: void mbee_video_kbd_scan(int param); UINT8 m_sy6545_cursor[16]; - MC6845_UPDATE_ROW(mbee_update_row); - MC6845_UPDATE_ROW(mbeeic_update_row); - MC6845_UPDATE_ROW(mbeeppc_update_row); - MC6845_ON_UPDATE_ADDR_CHANGED(mbee_update_addr); - MC6845_ON_UPDATE_ADDR_CHANGED(mbee256_update_addr); + MC6845_UPDATE_ROW(mono_update_row); + MC6845_UPDATE_ROW(colour_update_row); + MC6845_ON_UPDATE_ADDR_CHANGED(crtc_update_addr); required_device m_palette; private: bool m_is_premium; + bool m_has_oldkb; size_t m_size; bool m_b7_rtc; bool m_b7_vs; - UINT8 m_mbee256_key_available; + bool m_b2; UINT8 m_mbee256_was_pressed[15]; UINT8 m_mbee256_q[20]; UINT8 m_mbee256_q_pos; @@ -196,23 +182,10 @@ private: optional_memory_bank m_pak; optional_memory_bank m_telcom; optional_memory_bank m_basic; - required_ioport m_io_x0; - required_ioport m_io_x1; - required_ioport m_io_x2; - required_ioport m_io_x3; - required_ioport m_io_x4; - required_ioport m_io_x5; - required_ioport m_io_x6; - required_ioport m_io_x7; optional_ioport m_io_extra; - optional_ioport m_io_config; - optional_ioport m_io_x8; - optional_ioport m_io_x9; - optional_ioport m_io_x10; - optional_ioport m_io_x11; - optional_ioport m_io_x12; - optional_ioport m_io_x13; - optional_ioport m_io_x14; + required_ioport m_io_config; + optional_ioport_array<8> m_io_oldkb; + optional_ioport_array<15> m_io_newkb; required_device m_screen; }; diff --git a/src/mess/machine/mbee.c b/src/mess/machine/mbee.c index efeee7f945a..345fb1e0278 100644 --- a/src/mess/machine/mbee.c +++ b/src/mess/machine/mbee.c @@ -88,7 +88,8 @@ READ8_MEMBER( mbee_state::pio_port_b_r ) break; } - data |= m_mbee256_key_available; + data |= (UINT8)m_b2 << 1; // key pressed on new keyboard + data |= 8; // CTS held high via resistor. If low, the disk-based models think a mouse is plugged in. return data; }; @@ -114,7 +115,7 @@ WRITE_LINE_MEMBER( mbee_state::fdc_drq_w ) READ8_MEMBER( mbee_state::mbee_fdc_status_r ) { -/* d7 indicate if IRQ or DRQ is occuring (1=happening) +/* d7 indicate if IRQ or DRQ is occurring (1=happening) d6..d0 not used */ return m_fdc_rq ? 0xff : 0x7f; @@ -164,49 +165,34 @@ TIMER_CALLBACK_MEMBER(mbee_state::mbee256_kbd) It includes up to 4 KB of mask-programmable ROM, 64 bytes of scratchpad RAM and up to 64 bytes of executable RAM. The MCU also integrates 32-bit I/O and a programmable timer. */ - UINT8 i, j; - UINT8 pressed[15]; - - - /* see what is pressed */ - pressed[0] = m_io_x0->read(); - pressed[1] = m_io_x1->read(); - pressed[2] = m_io_x2->read(); - pressed[3] = m_io_x3->read(); - pressed[4] = m_io_x4->read(); - pressed[5] = m_io_x5->read(); - pressed[6] = m_io_x6->read(); - pressed[7] = m_io_x7->read(); - pressed[8] = m_io_x8->read(); - pressed[9] = m_io_x9->read(); - pressed[10] = m_io_x10->read(); - pressed[11] = m_io_x11->read(); - pressed[12] = m_io_x12->read(); - pressed[13] = m_io_x13->read(); - pressed[14] = m_io_x14->read(); - - /* find what has changed */ + UINT8 i, j, pressed; + + // find what has changed for (i = 0; i < 15; i++) { - if (pressed[i] != m_mbee256_was_pressed[i]) + pressed = m_io_newkb[i]->read(); + if (pressed != m_mbee256_was_pressed[i]) { - /* get scankey value */ + // get scankey value for (j = 0; j < 8; j++) { - if (BIT(pressed[i]^m_mbee256_was_pressed[i], j)) + if (BIT(pressed^m_mbee256_was_pressed[i], j)) { - /* put it in the queue */ - m_mbee256_q[m_mbee256_q_pos] = (i << 3) | j | (BIT(pressed[i], j) ? 0x80 : 0); + // put it in the queue + m_mbee256_q[m_mbee256_q_pos] = (i << 3) | j | (BIT(pressed, j) ? 0x80 : 0); if (m_mbee256_q_pos < 19) m_mbee256_q_pos++; } } - m_mbee256_was_pressed[i] = pressed[i]; + m_mbee256_was_pressed[i] = pressed; } } - /* if anything queued, cause an interrupt */ + // if anything queued, cause an interrupt if (m_mbee256_q_pos) - m_mbee256_key_available = 2; // set irq + { + m_b2 = 1; // set irq + //breaks keyboard m_pio->port_b_write(pio_port_b_r(generic_space(),0,0xff)); + } timer_set(attotime::from_hz(25), TIMER_MBEE256_KBD); } @@ -221,7 +207,7 @@ READ8_MEMBER( mbee_state::mbee256_18_r ) for (i = 0; i < m_mbee256_q_pos; i++) m_mbee256_q[i] = m_mbee256_q[i+1]; // ripple queue } - m_mbee256_key_available = 0; // clear irq + m_b2 = 0; // clear irq return data; } @@ -270,6 +256,9 @@ READ8_MEMBER( mbee_state::mbee_07_r ) // read // This doesn't seem to do anything; the time works without it. TIMER_CALLBACK_MEMBER( mbee_state::mbee_rtc_irq ) { + if (!m_rtc) + return; + UINT8 data = m_rtc->read(m_maincpu->space(AS_IO), 12); m_b7_rtc = (data) ? 1 : 0; @@ -292,6 +281,10 @@ TIMER_CALLBACK_MEMBER( mbee_state::mbee_rtc_irq ) b_mask = total dynamic ram (1=64k; 3=128k; 7=256k) + Certain software (such as the PJB system) constantly switch banks around, + causing slowness. Therefore this function only changes the banks that need + changing, leaving the others as is. + ************************************************************/ void mbee_state::setup_banks(UINT8 data, bool first_time, UINT8 b_mask) @@ -304,7 +297,7 @@ void mbee_state::setup_banks(UINT8 data, bool first_time, UINT8 b_mask) UINT16 b_vid; char banktag[10]; - if (first_time || (b_data != m_bank_array[0])) + if (first_time || (b_data != m_bank_array[0])) // if same data as last time, leave now { m_bank_array[0] = b_data; @@ -551,6 +544,7 @@ DRIVER_INIT_MEMBER( mbee_state, mbee ) UINT8 *RAM = memregion("maincpu")->base(); m_boot->configure_entries(0, 2, &RAM[0x0000], 0x8000); m_size = 0x4000; + m_has_oldkb = 1; } DRIVER_INIT_MEMBER( mbee_state, mbeeic ) @@ -563,6 +557,7 @@ DRIVER_INIT_MEMBER( mbee_state, mbeeic ) m_pak->set_entry(0); m_size = 0x8000; + m_has_oldkb = 1; } DRIVER_INIT_MEMBER( mbee_state, mbeepc ) @@ -579,6 +574,7 @@ DRIVER_INIT_MEMBER( mbee_state, mbeepc ) m_pak->set_entry(0); m_telcom->set_entry(0); m_size = 0x8000; + m_has_oldkb = 1; } DRIVER_INIT_MEMBER( mbee_state, mbeepc85 ) @@ -595,6 +591,7 @@ DRIVER_INIT_MEMBER( mbee_state, mbeepc85 ) m_pak->set_entry(5); m_telcom->set_entry(0); m_size = 0x8000; + m_has_oldkb = 1; } DRIVER_INIT_MEMBER( mbee_state, mbeeppc ) @@ -616,6 +613,7 @@ DRIVER_INIT_MEMBER( mbee_state, mbeeppc ) m_telcom->set_entry(0); m_basic->set_entry(0); m_size = 0x8000; + m_has_oldkb = 1; } DRIVER_INIT_MEMBER( mbee_state, mbee56 ) @@ -623,6 +621,7 @@ DRIVER_INIT_MEMBER( mbee_state, mbee56 ) UINT8 *RAM = memregion("maincpu")->base(); m_boot->configure_entries(0, 2, &RAM[0x0000], 0xe000); m_size = 0xe000; + m_has_oldkb = 1; } DRIVER_INIT_MEMBER( mbee_state, mbee128 ) @@ -641,7 +640,11 @@ DRIVER_INIT_MEMBER( mbee_state, mbee128 ) membank(banktag)->configure_entries(0, 32, &RAM[0x0000], 0x1000); // RAM banks membank(banktag)->configure_entries(64, 1, &ROM[0x4000], 0x1000); // dummy rom } + + timer_set(attotime::from_hz(1), TIMER_MBEE_RTC_IRQ); /* timer for rtc */ + m_size = 0x8000; + m_has_oldkb = 1; } DRIVER_INIT_MEMBER( mbee_state, mbee256 ) @@ -665,6 +668,7 @@ DRIVER_INIT_MEMBER( mbee_state, mbee256 ) timer_set(attotime::from_hz(50), TIMER_MBEE256_KBD); /* timer for kbd */ m_size = 0x8000; + m_has_oldkb = 0; } DRIVER_INIT_MEMBER( mbee_state, mbeett ) @@ -685,6 +689,7 @@ DRIVER_INIT_MEMBER( mbee_state, mbeett ) timer_set(attotime::from_hz(25), TIMER_MBEE256_KBD); /* timer for kbd */ m_size = 0x8000; + m_has_oldkb = 0; } diff --git a/src/mess/video/mbee.c b/src/mess/video/mbee.c index 873a39cae4b..f68ca6435c7 100644 --- a/src/mess/video/mbee.c +++ b/src/mess/video/mbee.c @@ -4,24 +4,7 @@ video hardware Juergen Buchmueller , Dec 1999 - Tests of keyboard. Start mbeeic. - - 1. Load ASTEROIDS PLUS, stay in attract mode, hold down spacebar, - it should only fire bullets. If it sometimes starts turning, - thrusting or using the shield, then there is a problem. - - 2. Load SCAVENGER and make sure it doesn't go to the next level - until you find the Exit. - - 3. At the Basic prompt, type in EDASM press enter. At the memory size - prompt press enter. Now, make sure the keyboard works properly. - - - - TODO: - - 1. mbeeppc keyboard response is quite slow. You need to hold each - key until it responds. It works much better if you overclock the cpu. + Rewritten by Robbbert ****************************************************************************/ @@ -214,65 +197,36 @@ WRITE8_MEMBER ( mbee_state::mbeeppc_high_w ) ************************************************************/ -/* The direction keys are used by the pc85 menu. Do not know what uses the "insert" key. */ void mbee_state::keyboard_matrix_r(int offs) { UINT8 port = (offs >> 7) & 7; UINT8 bit = (offs >> 4) & 7; - UINT8 data = 0; + UINT8 data = m_io_oldkb[port]->read(); + bool keydown = ( data >> bit ) & 1; - switch ( port ) - { - case 0: data = m_io_x0->read(); break; - case 1: data = m_io_x1->read(); break; - case 2: data = m_io_x2->read(); break; - case 3: data = m_io_x3->read(); break; - case 4: data = m_io_x4->read(); break; - case 5: data = m_io_x5->read(); break; - case 6: data = m_io_x6->read(); break; - case 7: data = m_io_x7->read(); break; - } - data = ( data >> bit ) & 1; - - if ((data | m_is_premium) == 0) + // This adds premium-style cursor keys to the old keyboard + // They are used by the pc85 & ppc menu, and the 128k shell. + if (!keydown) { UINT8 extra = m_io_extra->read(); - if( extra & 0x01 ) /* extra: cursor up */ - { - if( port == 7 && bit == 1 ) data = 1; /* Control */ - if( port == 0 && bit == 5 ) data = 1; /* E */ - } + if (extra && port == 7 && bit == 1) keydown = 1; /* Control */ + + if (BIT(extra, 0) && ( port == 0 && bit == 5 )) keydown = 1; // cursor up = ^E else - if( extra & 0x02 ) /* extra: cursor down */ - { - if( port == 7 && bit == 1 ) data = 1; /* Control */ - if( port == 3 && bit == 0 ) data = 1; /* X */ - } + if (BIT(extra, 1) && ( port == 3 && bit == 0 )) keydown = 1; // cursor down = ^X else - if( extra & 0x04 ) /* extra: cursor left */ - { - if( port == 7 && bit == 1 ) data = 1; /* Control */ - if( port == 2 && bit == 3 ) data = 1; /* S */ - } + if (BIT(extra, 2) && ( port == 2 && bit == 3 )) keydown = 1; // cursor left = ^S else - if( extra & 0x08 ) /* extra: cursor right */ - { - if( port == 7 && bit == 1 ) data = 1; /* Control */ - if( port == 0 && bit == 4 ) data = 1; /* D */ - } + if (BIT(extra, 3) && ( port == 0 && bit == 4 )) keydown = 1; // cursor right = ^D #if 0 - // this key doesn't appear on any keyboard afaik + // this key doesn't appear on any keyboard afaik. It is a Wordbee function. else - if( extra & 0x10 ) /* extra: insert */ - { - if( port == 7 && bit == 1 ) data = 1; /* Control */ - if( port == 2 && bit == 6 ) data = 1; /* V */ - } + if (BIT(extra, 4) && ( port == 2 && bit == 6 )) keydown = 1; // insert = ^V #endif } - if( data ) + if( keydown ) { m_sy6545_reg[17] = offs; m_sy6545_reg[16] = (offs >> 8) & 0x3f; @@ -283,8 +237,8 @@ void mbee_state::keyboard_matrix_r(int offs) void mbee_state::mbee_video_kbd_scan( int param ) { - if (m_0b) return; - + if (m_0b) return; // can't remember why this is here + if (param & 15) return; // only scan once per row instead of 16 times keyboard_matrix_r(param); } @@ -375,14 +329,14 @@ WRITE8_MEMBER ( mbee_state::m6545_data_w ) ************************************************************/ -VIDEO_START_MEMBER( mbee_state, mbee ) +VIDEO_START_MEMBER( mbee_state, mono ) { m_p_videoram = memregion("videoram")->base(); m_p_gfxram = memregion("gfx")->base()+0x1000; m_is_premium = 0; } -VIDEO_START_MEMBER( mbee_state, mbeeic ) +VIDEO_START_MEMBER( mbee_state, standard ) { m_p_videoram = memregion("videoram")->base(); m_p_colorram = memregion("colorram")->base(); @@ -390,7 +344,7 @@ VIDEO_START_MEMBER( mbee_state, mbeeic ) m_is_premium = 0; } -VIDEO_START_MEMBER( mbee_state, mbeeppc ) +VIDEO_START_MEMBER( mbee_state, premium ) { m_p_videoram = memregion("videoram")->base(); m_p_colorram = memregion("colorram")->base(); @@ -407,19 +361,15 @@ UINT32 mbee_state::screen_update_mbee(screen_device &screen, bitmap_rgb32 &bitma } -MC6845_ON_UPDATE_ADDR_CHANGED( mbee_state::mbee_update_addr ) +MC6845_ON_UPDATE_ADDR_CHANGED( mbee_state::crtc_update_addr ) { -/* not sure what goes in here - parameters passed are device, address, strobe */ -} - -MC6845_ON_UPDATE_ADDR_CHANGED( mbee_state::mbee256_update_addr ) -{ -/* not used on 256TC */ +// not sure what goes in here - parameters passed are device, address, strobe +// not used on 256TC } /* monochrome bee */ -MC6845_UPDATE_ROW( mbee_state::mbee_update_row ) +MC6845_UPDATE_ROW( mbee_state::mono_update_row ) { const rgb_t *palette = m_palette->palette()->entry_list_raw(); UINT8 chr,gfx; @@ -453,76 +403,43 @@ MC6845_UPDATE_ROW( mbee_state::mbee_update_row ) } } -/* prom-based colours */ -MC6845_UPDATE_ROW( mbee_state::mbeeic_update_row ) -{ - const rgb_t *palette = m_palette->palette()->entry_list_raw(); - UINT8 chr,gfx,fg,bg; - UINT16 mem,x,col; - UINT16 colourm = (m_08 & 0x0e) << 7; - UINT32 *p = &bitmap.pix32(y); - - for (x = 0; x < x_count; x++) // for each character - { - UINT8 inv=0; - mem = (ma + x) & 0x7ff; - chr = m_p_videoram[mem]; - col = m_p_colorram[mem] | colourm; // read a byte of colour - - mbee_video_kbd_scan(x+ma); - - /* process cursor */ - if (x == cursor_x) - inv ^= m_sy6545_cursor[ra]; // cursor scan row - - /* get pattern of pixels for that character scanline */ - gfx = m_p_gfxram[(chr<<4) | ra] ^ inv; - fg = (col & 0x001f) | 64; // map to foreground palette - bg = (col & 0x07e0) >> 5; // and background palette - - /* Display a scanline of a character (8 pixels) */ - *p++ = palette[BIT(gfx, 7) ? fg : bg]; - *p++ = palette[BIT(gfx, 6) ? fg : bg]; - *p++ = palette[BIT(gfx, 5) ? fg : bg]; - *p++ = palette[BIT(gfx, 4) ? fg : bg]; - *p++ = palette[BIT(gfx, 3) ? fg : bg]; - *p++ = palette[BIT(gfx, 2) ? fg : bg]; - *p++ = palette[BIT(gfx, 1) ? fg : bg]; - *p++ = palette[BIT(gfx, 0) ? fg : bg]; - } -} - - -/* new colours & hires2 */ -MC6845_UPDATE_ROW( mbee_state::mbeeppc_update_row ) +/* colour bee */ +MC6845_UPDATE_ROW( mbee_state::colour_update_row ) { const rgb_t *palette = m_palette->palette()->entry_list_raw(); - UINT8 gfx,fg,bg; + UINT8 inv,attr,gfx,fg,bg; UINT16 mem,x,col,chr; + UINT16 colourm = (m_08 & 0x0e) << 7; UINT32 *p = &bitmap.pix32(y); for (x = 0; x < x_count; x++) // for each character { - UINT8 inv=0; + inv = 0; mem = (ma + x) & 0x7ff; chr = m_p_videoram[mem]; col = m_p_colorram[mem]; // read a byte of colour - if (m_1c & 0x80) // are extended features enabled? + if (m_is_premium) { - UINT8 attr = m_p_attribram[mem]; + if (m_1c & 0x80) // are extended features enabled? + { + attr = m_p_attribram[mem]; - if (chr & 0x80) - chr += ((attr & 15) << 7); // bump chr to its particular pcg definition + if (chr & 0x80) + chr += ((attr & 15) << 7); // bump chr to its particular pcg definition - if (attr & 0x40) - inv ^= 0xff; // inverse attribute + if (attr & 0x40) + inv ^= 0xff; // inverse attribute - if ((attr & 0x80) && (m_framecnt & 0x10)) // flashing attribute - chr = 0x20; + if ((attr & 0x80) && (m_framecnt & 0x10)) // flashing attribute + chr = 0x20; + } } + else + col |= colourm; - mbee_video_kbd_scan(x+ma); + if (m_has_oldkb) + mbee_video_kbd_scan(x+ma); /* process cursor */ if (x == cursor_x) @@ -530,8 +447,18 @@ MC6845_UPDATE_ROW( mbee_state::mbeeppc_update_row ) /* get pattern of pixels for that character scanline */ gfx = m_p_gfxram[(chr<<4) | ra] ^ inv; - fg = col & 15; // map to foreground palette - bg = (col & 0xf0) >> 4; // and background palette + + // get colours + if (m_is_premium) + { + fg = col & 15; + bg = (col & 0xf0) >> 4; + } + else + { + fg = (col & 0x001f) | 64; + bg = (col & 0x07e0) >> 5; + } /* Display a scanline of a character (8 pixels) */ *p++ = palette[BIT(gfx, 7) ? fg : bg]; @@ -552,7 +479,7 @@ MC6845_UPDATE_ROW( mbee_state::mbeeppc_update_row ) ************************************************************/ -PALETTE_INIT_MEMBER( mbee_state, mbeeic ) +PALETTE_INIT_MEMBER( mbee_state, standard ) { const UINT8 *color_prom = memregion("proms")->base(); UINT16 i; @@ -610,7 +537,7 @@ PALETTE_INIT_MEMBER( mbee_state, mbeepc85b ) } -PALETTE_INIT_MEMBER( mbee_state, mbeeppc ) +PALETTE_INIT_MEMBER( mbee_state, premium ) { UINT16 i; UINT8 r, b, g; -- cgit v1.2.3 From 5cd0ae69b41631145bc1dab3db553a4f01de83b7 Mon Sep 17 00:00:00 2001 From: Stiletto Date: Fri, 13 Feb 2015 01:22:06 -0500 Subject: Added Platoon ver. (nw) Added Platoon version number. Contained in U1 ROM: COPYRIGHT.NOVA.PRODUCTIONS,.SOFTWARE.BY.J&L.BUCKLEY...OLDHAM.ATHLETIC.ARE.GREAT .DISK.ID.C-MK2.......SOFTWARE.REV.3.1.US --- src/mame/drivers/alg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/drivers/alg.c b/src/mame/drivers/alg.c index 1945b27f50a..8537f0682bc 100644 --- a/src/mame/drivers/alg.c +++ b/src/mame/drivers/alg.c @@ -810,7 +810,7 @@ GAME( 1995, fastdraw_130,fastdraw, alg_r2, alg_2p, alg_state, palr6, ROT90, /* works ok but uses right player (2) controls only for trigger and holster */ /* NOVA games on ALG hardware with own address scramble */ -GAME( 199?, aplatoon, alg_bios, alg_r2, alg, alg_state, aplatoon, ROT0, "Nova?", "Platoon V.?.? US", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) +GAME( 199?, aplatoon, alg_bios, alg_r2, alg, alg_state, aplatoon, ROT0, "Nova?", "Platoon V.3.1 US", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) /* Web Picmatic games PAL tv standard, own rom board */ GAME( 1993, zortonbr, alg_bios, picmatic, alg, alg_state, pal, ROT0, "Web Picmatic", "Zorton Brothers (Los Justicieros)", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) -- cgit v1.2.3 From 9f9d4fd25093a31a4657327ea3ee323b0dd0285a Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 13 Feb 2015 13:40:49 +0100 Subject: makelist implementation in python (nw) --- makefile | 4 +- src/build/build.mak | 26 ------ src/build/makelist.c | 228 --------------------------------------------------- 3 files changed, 2 insertions(+), 256 deletions(-) delete mode 100644 src/build/makelist.c diff --git a/makefile b/makefile index 7b027529f71..830e20b0a18 100644 --- a/makefile +++ b/makefile @@ -1012,9 +1012,9 @@ ifdef CPPCHECK @$(CPPCHECK) $(CPPCHECKFLAGS) $< endif -$(DRIVLISTSRC): $(SRC)/$(TARGET)/$(SUBTARGET).lst $(MAKELIST_TARGET) +$(DRIVLISTSRC): $(SRC)/$(TARGET)/$(SUBTARGET).lst $(SRC)/build/makelist.py @echo Building driver list $<... - @$(MAKELIST) $< >$@ + $(PYTHON) $(SRC)/build/makelist.py $< >$@ ifeq ($(TARGETOS),emscripten) # Avoid using .a files with Emscripten, link to bitcode instead diff --git a/src/build/build.mak b/src/build/build.mak index 429aec233a6..025c5e4ace2 100644 --- a/src/build/build.mak +++ b/src/build/build.mak @@ -20,19 +20,16 @@ OBJDIRS += \ MAKEDEP_TARGET = $(BUILDOUT)/makedep$(BUILD_EXE) MAKEMAK_TARGET = $(BUILDOUT)/makemak$(BUILD_EXE) -MAKELIST_TARGET = $(BUILDOUT)/makelist$(BUILD_EXE) VERINFO_TARGET = $(BUILDOUT)/verinfo$(BUILD_EXE) MAKEDEP = $(MAKEDEP_TARGET) MAKEMAK = $(MAKEMAK_TARGET) -MAKELIST = $(MAKELIST_TARGET) VERINFO = $(VERINFO_TARGET) ifneq ($(TERM),cygwin) ifeq ($(OS),Windows_NT) MAKEDEP = $(subst /,\,$(MAKEDEP_TARGET)) MAKEMAK = $(subst /,\,$(MAKEMAK_TARGET)) -MAKELIST = $(subst /,\,$(MAKELIST_TARGET)) VERINFO = $(subst /,\,$(VERINFO_TARGET)) endif endif @@ -41,7 +38,6 @@ ifneq ($(CROSS_BUILD),1) BUILD += \ $(MAKEDEP_TARGET) \ $(MAKEMAK_TARGET) \ - $(MAKELIST_TARGET) \ $(VERINFO_TARGET) \ @@ -83,25 +79,6 @@ $(MAKEMAK_TARGET): $(MAKEMAKOBJS) $(LIBOCORE) $(ZLIB) -#------------------------------------------------- -# makelist -#------------------------------------------------- - -MAKELISTOBJS = \ - $(BUILDOBJ)/makelist.o \ - $(OBJ)/lib/util/astring.o \ - $(OBJ)/lib/util/corealloc.o \ - $(OBJ)/lib/util/cstrpool.o \ - $(OBJ)/lib/util/corefile.o \ - $(OBJ)/lib/util/unicode.o \ - $(OBJ)/lib/util/tagmap.o \ - -$(MAKELIST_TARGET): $(MAKELISTOBJS) $(LIBOCORE) $(ZLIB) - @echo Linking $@... - $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@ - - - #------------------------------------------------- # verinfo #------------------------------------------------- @@ -120,9 +97,6 @@ else $(MAKEDEP_TARGET): @echo $@ should be built natively. Nothing to do. -$(MAKELIST_TARGET): - @echo $@ should be built natively. Nothing to do. - $(VERINFO_TARGET): @echo $@ should be built natively. Nothing to do. diff --git a/src/build/makelist.c b/src/build/makelist.c deleted file mode 100644 index 04327e78fe0..00000000000 --- a/src/build/makelist.c +++ /dev/null @@ -1,228 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Aaron Giles -/*************************************************************************** - - makelist.c - - Create and sort the driver list. - -***************************************************************************/ - -#include -#include -#include -#include "corefile.h" -#include "cstrpool.h" - - -static dynamic_array drivlist; -static dynamic_array ignorelst; -static const_string_pool string_pool; - - -//------------------------------------------------- -// driver_sort_callback - compare two items in -// a string array -//------------------------------------------------- - -int sort_callback(const void *elem1, const void *elem2) -{ - const char **item1 = (const char **)elem1; - const char **item2 = (const char **)elem2; - return strcmp(*item1, *item2); -} - -//------------------------------------------------- -// isignored - return info if item is in ignore -// list or not -//------------------------------------------------- - -bool isignored(const char *drivname) -{ - for (int i = 0; i < ignorelst.count(); i++) - if (strcmp(ignorelst[i], drivname) == 0) - return true; - return false; -} - -//------------------------------------------------- -// parse_file - parse a single file, may be -// called recursively -//------------------------------------------------- - -int parse_file(const char *srcfile) -{ - // read source file - dynamic_buffer buffer; - file_error filerr = core_fload(srcfile, buffer); - if (filerr != FILERR_NONE) - { - fprintf(stderr, "Unable to read source file '%s'\n", srcfile); - return 1; - } - - // rip through it to find all drivers - char *srcptr = (char *)&buffer[0]; - char *endptr = srcptr + buffer.count(); - int linenum = 1; - bool in_comment = false; - while (srcptr < endptr) - { - char c = *srcptr++; - - // count newlines - if (c == 13 || c == 10) - { - if (c == 13 && *srcptr == 10) - srcptr++; - linenum++; - continue; - } - - // skip any spaces - if (isspace(c)) - continue; - - // look for end of C comment - if (in_comment && c == '*' && *srcptr == '/') - { - srcptr++; - in_comment = false; - continue; - } - - // skip anything else inside a C comment - if (in_comment) - continue; - - // look for start of C comment - if (c == '/' && *srcptr == '*') - { - srcptr++; - in_comment = true; - continue; - } - - // if we hit a C++ comment, scan to the end of line - if (c == '/' && *srcptr == '/') - { - while (srcptr < endptr && *srcptr != 13 && *srcptr != 10) - srcptr++; - continue; - } - - // look for an import directive - if (c == '#') - { - char filename[256]; - filename[0] = 0; - for (int pos = 0; srcptr < endptr && pos < ARRAY_LENGTH(filename) - 1 && !isspace(*srcptr); pos++) - { - filename[pos] = *srcptr++; - filename[pos+1] = 0; - } - fprintf(stderr, "Importing drivers from '%s'\n", filename); - parse_file(filename); - continue; - } - if (c == '!') - { - char drivname[256]; - drivname[0] = 0; - for (int pos = 0; srcptr < endptr && pos < ARRAY_LENGTH(drivname) - 1 && !isspace(*srcptr); pos++) - { - drivname[pos] = *srcptr++; - drivname[pos+1] = 0; - } - fprintf(stderr, "Place driver '%s' to ignore list\n", drivname); - ignorelst.append(string_pool.add(drivname)); - continue; - } - - // otherwise treat as a driver name - char drivname[32]; - drivname[0] = 0; - srcptr--; - for (int pos = 0; srcptr < endptr && pos < ARRAY_LENGTH(drivname) - 1 && !isspace(*srcptr); pos++) - { - drivname[pos] = *srcptr++; - drivname[pos+1] = 0; - } - - // verify the name as valid - for (char *drivch = drivname; *drivch != 0; drivch++) - { - if ((*drivch >= 'a' && *drivch <= 'z') || (*drivch >= '0' && *drivch <= '9') || *drivch == '_') - continue; - fprintf(stderr, "%s:%d - Invalid character '%c' in driver \"%s\"\n", srcfile, linenum, *drivch, drivname); - return 1; - } - - // add it to the list - if (!isignored(drivname)) - drivlist.append(string_pool.add(drivname)); - } - - return 0; -} - - -//------------------------------------------------- -// main - primary entry point -//------------------------------------------------- - -int main(int argc, char *argv[]) -{ - // needs at least 1 argument - if (argc < 2) - { - fprintf(stderr, - "Usage:\n" - " makelist \n" - ); - return 0; - } - - // extract arguments - const char *srcfile = argv[1]; - - // parse the root file, exit early upon failure - if (parse_file(srcfile)) - return 1; - - // output a count - if (drivlist.count() == 0) - { - fprintf(stderr, "No drivers found\n"); - return 1; - } - fprintf(stderr, "%d drivers found\n", drivlist.count()); - - // add a reference to the ___empty driver - drivlist.append("___empty"); - - // sort the list - qsort(drivlist, drivlist.count(), sizeof(drivlist[0]), sort_callback); - - // start with a header - printf("#include \"emu.h\"\n\n"); - printf("#include \"drivenum.h\"\n\n"); - - // output the list of externs first - for (int index = 0; index < drivlist.count(); index++) - printf("GAME_EXTERN(%s);\n", drivlist[index]); - printf("\n"); - - // then output the array - printf("const game_driver * const driver_list::s_drivers_sorted[%d] =\n", drivlist.count()); - printf("{\n"); - for (int index = 0; index < drivlist.count(); index++) - printf("\t&GAME_NAME(%s)%s\n", drivlist[index], (index == drivlist.count() - 1) ? "" : ","); - printf("};\n"); - printf("\n"); - - // also output a global count - printf("int driver_list::s_driver_count = %d;\n", drivlist.count()); - - return 0; -} -- cgit v1.2.3 From f89a72489a39a7283c9050ea1a82f02008df457b Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 13 Feb 2015 13:47:32 +0100 Subject: doh (nw) --- src/build/makelist.py | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 src/build/makelist.py diff --git a/src/build/makelist.py b/src/build/makelist.py new file mode 100644 index 00000000000..d58abce0c1d --- /dev/null +++ b/src/build/makelist.py @@ -0,0 +1,94 @@ +#!/usr/bin/python + +from __future__ import with_statement + +import sys +import os + +drivlist = [] + +def parse_file(srcfile): + try: + fp = open(srcfile, 'rb') + except IOError: + print("Unable to open source file '%s'" % srcfile) + return 1 + in_comment = 0 + linenum = 0 + for line in fp.readlines(): + drivname = '' + linenum+=1 + srcptr = 0 + while srcptr < len(line): + c = line[srcptr] + srcptr+=1 + if c==13 or c==10: + if c==13 and line[srcptr]==10: + srcptr+=1 + continue + if c==' ': + continue; + if in_comment==1 and c=='*' and line[srcptr]=='/' : + srcptr+=1 + in_comment = 0; + continue + if (in_comment): + continue + if c=='/' and line[srcptr]=='*' : + srcptr+=1 + in_comment = 1; + continue + if c=='/' and line[srcptr]=='/' : + break + drivname += c + drivname = drivname.strip() + if (len(drivname)>0): + if drivname[0]=='#': + sys.stderr.write("Importing drivers from '%s'\n" % drivname[1:]) + parse_file(drivname[1:]) + continue + if not all(((c >='a' and c<='z') or (c>='0' and c<='9') or c=='_') for c in drivname): + sys.stderr.write("%s:%d - Invalid character in driver \"%s\"\n" % (srcfile, linenum, drivname)) + return 1 + else: + drivlist.append(drivname) + return 0 + + +if (len(sys.argv) < 2) : + print('Usage:') + print(' makelist ') + sys.exit(0) + +if (parse_file(sys.argv[1])) : + sys.exit(1) + +# output a count +if (len(drivlist)==0) : + sys.stderr.write("No drivers found\n") + sys.exit(1) + +sys.stderr.write("%d drivers found\n" % len(drivlist)) + +# add a reference to the ___empty driver +drivlist.append("___empty") + +# start with a header +print('#include "emu.h"\n'); +print('#include "drivenum.h"\n'); + +#output the list of externs first +for drv in sorted(drivlist): + print("GAME_EXTERN(%s);" % drv) +print("") + +# then output the array +print("const game_driver * const driver_list::s_drivers_sorted[%d] =" % len(drivlist)) +print("{") +for drv in sorted(drivlist): + print("\t&GAME_NAME(%s)," % drv) +print("};"); +print(""); + +# also output a global count +print("int driver_list::s_driver_count = %d;\n" % len(drivlist)) -- cgit v1.2.3 From 9c7564356422f6afd974f884adbada004f451a38 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 13 Feb 2015 15:25:13 +0100 Subject: verinfo to python (nw) --- src/build/build.mak | 19 --- src/build/verinfo.c | 308 --------------------------------------- src/build/verinfo.py | 116 +++++++++++++++ src/mess/osd/windows/windows.mak | 4 +- src/osd/windows/windows.mak | 4 +- src/ume/osd/windows/windows.mak | 4 +- 6 files changed, 122 insertions(+), 333 deletions(-) delete mode 100644 src/build/verinfo.c create mode 100644 src/build/verinfo.py diff --git a/src/build/build.mak b/src/build/build.mak index 025c5e4ace2..e13a8be66d6 100644 --- a/src/build/build.mak +++ b/src/build/build.mak @@ -20,17 +20,14 @@ OBJDIRS += \ MAKEDEP_TARGET = $(BUILDOUT)/makedep$(BUILD_EXE) MAKEMAK_TARGET = $(BUILDOUT)/makemak$(BUILD_EXE) -VERINFO_TARGET = $(BUILDOUT)/verinfo$(BUILD_EXE) MAKEDEP = $(MAKEDEP_TARGET) MAKEMAK = $(MAKEMAK_TARGET) -VERINFO = $(VERINFO_TARGET) ifneq ($(TERM),cygwin) ifeq ($(OS),Windows_NT) MAKEDEP = $(subst /,\,$(MAKEDEP_TARGET)) MAKEMAK = $(subst /,\,$(MAKEMAK_TARGET)) -VERINFO = $(subst /,\,$(VERINFO_TARGET)) endif endif @@ -38,7 +35,6 @@ ifneq ($(CROSS_BUILD),1) BUILD += \ $(MAKEDEP_TARGET) \ $(MAKEMAK_TARGET) \ - $(VERINFO_TARGET) \ @@ -78,18 +74,6 @@ $(MAKEMAK_TARGET): $(MAKEMAKOBJS) $(LIBOCORE) $(ZLIB) $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@ - -#------------------------------------------------- -# verinfo -#------------------------------------------------- - -VERINFOOBJS = \ - $(BUILDOBJ)/verinfo.o - -$(VERINFO_TARGET): $(VERINFOOBJS) $(LIBOCORE) - @echo Linking $@... - $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@ - else #------------------------------------------------- # It's a CROSS_BUILD. Ensure the targets exist. @@ -97,7 +81,4 @@ else $(MAKEDEP_TARGET): @echo $@ should be built natively. Nothing to do. -$(VERINFO_TARGET): - @echo $@ should be built natively. Nothing to do. - endif # CROSS_BUILD diff --git a/src/build/verinfo.c b/src/build/verinfo.c deleted file mode 100644 index 041de403cca..00000000000 --- a/src/build/verinfo.c +++ /dev/null @@ -1,308 +0,0 @@ -//============================================================ -// -// verinfo.c - Version resource emitter code -// -// Copyright Nicola Salmoria and the MAME Team. -// Visit http://mamedev.org for licensing and usage restrictions. -// -//============================================================ - -#include -#include - -#include -#include - -typedef unsigned char UINT8; - -#define ARRAY_LENGTH(x) (sizeof(x) / sizeof(x[0])) -#define BUILD_MAME (0) -#define BUILD_MESS (1) -#define BUILD_UME (2) - -//============================================================ -// TYPE DEFINITIONS -//============================================================ - -struct version_info -{ - int version_major; - int version_minor; - int version_build; - int version_subbuild; - const char *version_string; - const char *author; - const char *comments; - const char *company_name; - const char *file_description; - const char *internal_name; - const char *legal_copyright; - const char *original_filename; - const char *product_name; -}; - - - -//============================================================ -// STATIC -//============================================================ - -static int build; - - -//============================================================ -// emit_version_info -//============================================================ - -static void emit_version_info(const version_info *v) -{ - printf("VS_VERSION_INFO VERSIONINFO\n"); - printf("\tFILEVERSION %d,%d,%d,%d\n", v->version_major, v->version_minor, v->version_build, v->version_subbuild); - printf("\tPRODUCTVERSION %d,%d,%d,%d\n", v->version_major, v->version_minor, v->version_build, v->version_subbuild); - printf("\tFILEFLAGSMASK 0x3fL\n"); -#ifdef MAME_DEBUG - if (v->version_build == 0) - printf("\tFILEFLAGS VS_FF_DEBUG\n"); - else - printf("\tFILEFLAGS VS_FF_PRERELEASE | VS_FF_DEBUG\n"); -#else - if (v->version_build == 0) - printf("\tFILEFLAGS 0x0L\n"); - else - printf("\tFILEFLAGS VS_FF_PRERELEASE\n"); -#endif - printf("\tFILEOS VOS_NT_WINDOWS32\n"); - printf("\tFILETYPE VFT_APP\n"); - printf("\tFILESUBTYPE VFT2_UNKNOWN\n"); - printf("BEGIN\n"); - printf("\tBLOCK \"StringFileInfo\"\n"); - printf("\tBEGIN\n"); - printf("#ifdef UNICODE\n"); - printf("\t\tBLOCK \"040904b0\"\n"); - printf("#else\n"); - printf("\t\tBLOCK \"040904E4\"\n"); - printf("#endif\n"); - printf("\t\tBEGIN\n"); - if (v->author != NULL) - printf("\t\t\tVALUE \"Author\", \"%s\\0\"\n", v->author); - if (v->comments != NULL) - printf("\t\t\tVALUE \"Comments\", \"%s\\0\"\n", v->comments); - if (v->company_name != NULL) - printf("\t\t\tVALUE \"CompanyName\", \"%s\\0\"\n", v->company_name); - if (v->file_description != NULL) - printf("\t\t\tVALUE \"FileDescription\", \"%s\\0\"\n", v->file_description); - printf("\t\t\tVALUE \"FileVersion\", \"%d, %d, %d, %d\\0\"\n", v->version_major, v->version_minor, v->version_build, v->version_subbuild); - if (v->internal_name != NULL) - printf("\t\t\tVALUE \"InternalName\", \"%s\\0\"\n", v->internal_name); - if (v->legal_copyright != NULL) - printf("\t\t\tVALUE \"LegalCopyright\", \"%s\\0\"\n", v->legal_copyright); - if (v->original_filename != NULL) - printf("\t\t\tVALUE \"OriginalFilename\", \"%s\\0\"\n", v->original_filename); - if (v->product_name != NULL) - printf("\t\t\tVALUE \"ProductName\", \"%s\\0\"\n", v->product_name); - printf("\t\t\tVALUE \"ProductVersion\", \"%s\\0\"\n", v->version_string); - printf("\t\tEND\n"); - printf("\tEND\n"); - printf("\tBLOCK \"VarFileInfo\"\n"); - printf("\tBEGIN\n"); - printf("#ifdef UNICODE\n"); - printf("\t\tVALUE \"Translation\", 0x409, 1200\n"); - printf("#else\n"); - printf("\t\tVALUE \"Translation\", 0x409, 1252\n"); - printf("#endif\n"); - printf("\tEND\n"); - printf("END\n"); -} - - - -//============================================================ -// parse_version_digit -//============================================================ - -static bool parse_version_digit(const char *str, int *position, int* value) -{ - int res = 0; - - while (str[*position] != 0 && !isspace((UINT8)str[*position]) && !isdigit((UINT8)str[*position])) - (*position)++; - - if (str[*position] != 0 && isdigit((UINT8)str[*position])) - { - res = sscanf(&str[*position], "%d", value); - while (isdigit((UINT8)str[*position])) - (*position)++; - } - return res == 1; -} - - - -//============================================================ -// parse_version -//============================================================ - -static int parse_version(char *str, int *version_major, int *version_minor, const char **version_string) -{ - char *version; - int position = 0; - - // find the version string - version = strstr(str, "BARE_BUILD_VERSION"); - if (version != NULL) - version = strchr(version, '"'); - if (version == NULL || *version == '\0' || strchr(version, '.') == NULL) - { - fprintf(stderr, "Unable to find version string\n"); - return 1; - } - version++; - *strchr(version, '"') = 0; - - *version_string = version; - if (!parse_version_digit(version, &position, version_major)) - { - fprintf(stderr, "Unable to parse major version\n"); - return 1; - } - if (!parse_version_digit(version, &position, version_minor)) - { - fprintf(stderr, "Unable to parse minor version\n"); - return 1; - } - return 0; -} - - - -//============================================================ -// main -//============================================================ -static int usage(char *me) -{ - fprintf(stderr, "Usage: %s [-b mame|mess|ume] \n", me); - return 1; -} - - -//============================================================ -// main -//============================================================ - -int main(int argc, char *argv[]) -{ - version_info v; - char legal_copyright[512]; - char *buffer; - size_t size; - int opt; - FILE *f; - - memset(&v, 0, sizeof(v)); - build = BUILD_MAME; - - // validate parameters - opt = 1; - while (opt < argc && *argv[opt] == '-') - { - if (!strcmp(argv[opt], "-b")) - { - char *p = argv[++opt]; - if (!strcmp(p,"mame")) - build = BUILD_MAME; - else if (!strcmp(p,"mess")) - build = BUILD_MESS; - else if (!strcmp(p,"ume")) - build = BUILD_UME; - else - return usage(argv[0]); - } - else - return usage(argv[0]); - opt++; - } - - if (opt != argc-1 ) - { - return usage(argv[0]); - } - - // open the file - f = fopen(argv[argc-1], "rb"); - if (f == NULL) - { - fprintf(stderr, "Error opening file %s\n", argv[argc-1]); - return 1; - } - - // get the file size - fseek(f, 0, SEEK_END); - size = ftell(f); - fseek(f, 0, SEEK_SET); - - // allocate a buffer - buffer = (char *)malloc(size + 1); - if (buffer == NULL) - { - fclose(f); - fprintf(stderr, "Error allocating %ld bytes\n", (long) size + 1); - return 1; - } - - // read the file contents and NULL-terminate - fread(buffer, 1, size, f); - fclose(f); - buffer[size] = 0; - - // parse out version string - if (parse_version(buffer, &v.version_major, &v.version_minor, &v.version_string)) - { - fprintf(stderr, "Error parsing version\n"); - free(buffer); - return 1; - } - - if (build == BUILD_MESS) - { - // MESS - v.author = "MESS Team"; - v.comments = "Multi Emulation Super System"; - v.company_name = "MESS Team"; - v.file_description = "Multi Emulation Super System"; - v.internal_name = "MESS"; - v.original_filename = "MESS"; - v.product_name = "MESS"; - } - else if (build == BUILD_UME) - { - // UME - v.author = "MAME and MESS Team"; - v.comments = "Universal Machine Emulator"; - v.company_name = "MAME and MESS Team"; - v.file_description = "Universal Machine Emulator"; - v.internal_name = "UME"; - v.original_filename = "UME"; - v.product_name = "UME"; - } - else - { - // MAME - v.author = "Nicola Salmoria and the MAME Team"; - v.comments = "Multiple Arcade Machine Emulator"; - v.company_name = "MAME Team"; - v.file_description = "Multiple Arcade Machine Emulator"; - v.internal_name = "MAME"; - v.original_filename = "MAME"; - v.product_name = "MAME"; - } - - // build legal_copyright string - v.legal_copyright = legal_copyright; - snprintf(legal_copyright, ARRAY_LENGTH(legal_copyright), "Copyright Nicola Salmoria and the MAME team"); - - // emit the info - emit_version_info(&v); - - free(buffer); - return 0; -} diff --git a/src/build/verinfo.py b/src/build/verinfo.py new file mode 100644 index 00000000000..7930428ba83 --- /dev/null +++ b/src/build/verinfo.py @@ -0,0 +1,116 @@ +#!/usr/bin/python + +from __future__ import with_statement + +import sys +import os + +def usage(): + sys.stderr.write('Usage: verinfo.py [-b mame|mess|ume] \n') + return 0 + +build = "mame" + +if (len(sys.argv)==1): + usage() + sys.exit(1) + +if (sys.argv[1]=='-b'): + if (sys.argv[2]=='mame'): + build = "mame" + elif (sys.argv[2]=='mess'): + build = "mess" + elif (sys.argv[2]=='ume'): + build = "ume" + else : + usage() + sys.exit(1) + +srcfile = sys.argv[len(sys.argv)-1] +try: + fp = open(srcfile, 'rb') +except IOError: + sys.stderr.write("Unable to open source file '%s'" % srcfile) + sys.exit(1) + +for line in fp.readlines(): + if line.find("BARE_BUILD_VERSION")!=-1 and line.find('"')!=-1 and line.find('.')!=-1: + version_string = line[line.find('"')+1:] + version_string = version_string[0:version_string.find('"')] + break + +version_major = version_string[0:version_string.find('.')] +version_minor = version_string[version_string.find('.')+1:] +version_build = "0" +version_subbuild = "0" +if (build == "mame") : + # MESS + author = "MESS Team"; + comments = "Multi Emulation Super System"; + company_name = "MESS Team"; + file_description = "Multi Emulation Super System"; + internal_name = "MESS"; + original_filename = "MESS"; + product_name = "MESS"; +elif (build == "mess") : + # UME + author = "MAME and MESS Team" + comments = "Universal Machine Emulator" + company_name = "MAME and MESS Team" + file_description = "Universal Machine Emulator" + internal_name = "UME" + original_filename = "UME" + product_name = "UME" +else : + # MAME + author = "Nicola Salmoria and the MAME Team" + comments = "Multiple Arcade Machine Emulator" + company_name = "MAME Team" + file_description = "Multiple Arcade Machine Emulator" + internal_name = "MAME" + original_filename = "MAME" + product_name = "MAME" + +legal_copyright = "Copyright Nicola Salmoria and the MAME team" + +print("VS_VERSION_INFO VERSIONINFO") +print("\tFILEVERSION %s,%s,%s,%s" % (version_major, version_minor, version_build, version_subbuild)) +print("\tPRODUCTVERSION %s,%s,%s,%s" % (version_major, version_minor, version_build, version_subbuild)) +print("\tFILEFLAGSMASK 0x3fL") +if (version_build == 0) : + print("\tFILEFLAGS 0x0L") +else : + print("\tFILEFLAGS VS_FF_PRERELEASE") +print("\tFILEOS VOS_NT_WINDOWS32") +print("\tFILETYPE VFT_APP") +print("\tFILESUBTYPE VFT2_UNKNOWN") +print("BEGIN") +print("\tBLOCK \"StringFileInfo\"") +print("\tBEGIN") +print("#ifdef UNICODE") +print("\t\tBLOCK \"040904b0\"") +print("#else") +print("\t\tBLOCK \"040904E4\"") +print("#endif") +print("\t\tBEGIN") +print("\t\t\tVALUE \"Author\", \"%s\\0\"" % author) +print("\t\t\tVALUE \"Comments\", \"%s\\0\"" % comments) +print("\t\t\tVALUE \"CompanyName\", \"%s\\0\"" % company_name) +print("\t\t\tVALUE \"FileDescription\", \"%s\\0\"" % file_description) +print("\t\t\tVALUE \"FileVersion\", \"%s, %s, %s, %s\\0\"" % (version_major, version_minor, version_build, version_subbuild)) +print("\t\t\tVALUE \"InternalName\", \"%s\\0\"" % internal_name) +print("\t\t\tVALUE \"LegalCopyright\", \"%s\\0\"" % legal_copyright) +print("\t\t\tVALUE \"OriginalFilename\", \"%s\\0\"" % original_filename) +print("\t\t\tVALUE \"ProductName\", \"%s\\0\"" % product_name) +print("\t\t\tVALUE \"ProductVersion\", \"%s\\0\"" % version_string) +print("\t\tEND") +print("\tEND") +print("\tBLOCK \"VarFileInfo\"") +print("\tBEGIN") +print("#ifdef UNICODE") +print("\t\tVALUE \"Translation\", 0x409, 1200") +print("#else") +print("\t\tVALUE \"Translation\", 0x409, 1252") +print("#endif") +print("\tEND") +print("END") \ No newline at end of file diff --git a/src/mess/osd/windows/windows.mak b/src/mess/osd/windows/windows.mak index ea97abf7d61..4461c6d14bb 100644 --- a/src/mess/osd/windows/windows.mak +++ b/src/mess/osd/windows/windows.mak @@ -36,6 +36,6 @@ $(MESS_WINOBJ)/%.res: $(MESS_WINSRC)/%.rc $(RESFILE): $(MESS_WINSRC)/mess.rc $(MESS_WINOBJ)/messvers.rc -$(MESS_WINOBJ)/messvers.rc: $(BUILDOUT)/verinfo$(BUILD_EXE) $(SRC)/version.c +$(MESS_WINOBJ)/messvers.rc: $(SRC)/build/verinfo.py $(SRC)/version.c @echo Emitting $@... - @"$(BUILDOUT)/verinfo$(BUILD_EXE)" -b mess $(SRC)/version.c > $@ \ No newline at end of file + $(PYTHON) $(SRC)/build/verinfo.py -b mess $(SRC)/version.c > $@ \ No newline at end of file diff --git a/src/osd/windows/windows.mak b/src/osd/windows/windows.mak index eac9bdbdeb7..a4285a2a410 100644 --- a/src/osd/windows/windows.mak +++ b/src/osd/windows/windows.mak @@ -502,6 +502,6 @@ $(WINOBJ)/%.res: $(WINSRC)/%.rc | $(OSPREBUILD) $(RESFILE): $(WINSRC)/mame.rc $(WINOBJ)/mamevers.rc -$(WINOBJ)/mamevers.rc: $(BUILDOUT)/verinfo$(BUILD_EXE) $(SRC)/version.c +$(WINOBJ)/mamevers.rc: $(SRC)/build/verinfo.py $(SRC)/version.c @echo Emitting $@... - @"$(BUILDOUT)/verinfo$(BUILD_EXE)" -b mame $(SRC)/version.c > $@ + $(PYTHON) $(SRC)/build/verinfo.py -b mame $(SRC)/version.c > $@ diff --git a/src/ume/osd/windows/windows.mak b/src/ume/osd/windows/windows.mak index 1885eeac92d..5163e0e8c93 100644 --- a/src/ume/osd/windows/windows.mak +++ b/src/ume/osd/windows/windows.mak @@ -36,6 +36,6 @@ $(UME_WINOBJ)/%.res: $(UME_WINSRC)/%.rc $(RESFILE): $(UME_WINSRC)/ume.rc $(UME_WINOBJ)/umevers.rc -$(UME_WINOBJ)/umevers.rc: $(BUILDOUT)/verinfo$(BUILD_EXE) $(SRC)/version.c +$(UME_WINOBJ)/umevers.rc: $(SRC)/build/verinfo.py $(SRC)/version.c @echo Emitting $@... - @"$(BUILDOUT)/verinfo$(BUILD_EXE)" -b ume $(SRC)/version.c > $@ \ No newline at end of file + $(PYTHON) $(SRC)/build/verinfo.py -b ume $(SRC)/version.c > $@ \ No newline at end of file -- cgit v1.2.3 From f0f8531973636574a82bc95ca4c88b745f85c097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Fri, 13 Feb 2015 16:03:04 +0100 Subject: fixed clang compiler warning (nw) --- src/osd/sdl/draw13.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/sdl/draw13.c b/src/osd/sdl/draw13.c index 6848a12fb12..564ee117836 100644 --- a/src/osd/sdl/draw13.c +++ b/src/osd/sdl/draw13.c @@ -178,7 +178,7 @@ private: INT32 m_blittimer; #if (SDLMAME_SDL2) - SDL_GLContext m_gl_context_id; + //SDL_GLContext m_gl_context_id; #else // SDL surface SDL_Surface *m_sdlsurf; -- cgit v1.2.3 From 77eff3f6429726c7280b6f3a229a9c8a206d35e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Fri, 13 Feb 2015 16:06:19 +0100 Subject: verinfo.py: fixed switched version information (nw) --- src/build/verinfo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/build/verinfo.py b/src/build/verinfo.py index 7930428ba83..71f616f4415 100644 --- a/src/build/verinfo.py +++ b/src/build/verinfo.py @@ -43,7 +43,7 @@ version_major = version_string[0:version_string.find('.')] version_minor = version_string[version_string.find('.')+1:] version_build = "0" version_subbuild = "0" -if (build == "mame") : +if (build == "mess") : # MESS author = "MESS Team"; comments = "Multi Emulation Super System"; @@ -52,7 +52,7 @@ if (build == "mame") : internal_name = "MESS"; original_filename = "MESS"; product_name = "MESS"; -elif (build == "mess") : +elif (build == "ume") : # UME author = "MAME and MESS Team" comments = "Universal Machine Emulator" @@ -61,7 +61,7 @@ elif (build == "mess") : internal_name = "UME" original_filename = "UME" product_name = "UME" -else : +else : # MAME author = "Nicola Salmoria and the MAME Team" comments = "Multiple Arcade Machine Emulator" -- cgit v1.2.3 From 3d94a3a3d95777861abf8ff9b3ede7fce45fd1c1 Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Thu, 12 Feb 2015 20:44:57 -0500 Subject: champbas.c, equites.c, shougi.c: rename the alpha-8xxx mcu dumps to better reflect the actual chip labels and the fact that they are HD44801 mcus. add the undumped alpha-8304 mcu as NO_DUMP [Lord Nightmare] --- src/mame/drivers/champbas.c | 10 +++++----- src/mame/drivers/shougi.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mame/drivers/champbas.c b/src/mame/drivers/champbas.c index 57c3602e309..342e9baeb50 100644 --- a/src/mame/drivers/champbas.c +++ b/src/mame/drivers/champbas.c @@ -801,7 +801,7 @@ ROM_START( talbot ) ROM_LOAD( "16.11i", 0x5000, 0x1000, CRC(1612adf5) SHA1(9adeb21d5d1692f6e31460062f03f2008076b307) ) ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "8201.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) ) + ROM_LOAD( "alpha-8201__44801a75__2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) ) ROM_REGION( 0x1000, "gfx1", 0 ) // chars ROM_LOAD( "7.6a", 0x0000, 0x1000, CRC(bde14194) SHA1(f8f569342a3094eb5450a30b8ab87901b98e6061) ) @@ -848,7 +848,7 @@ ROM_START( champbasj ) ROM_LOAD( "18.2n", 0x4000, 0x2000, CRC(2dc484dd) SHA1(28bd68c787d7e6989849ca52009948dbd5cdcc79) ) ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "8201.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) ) + ROM_LOAD( "alpha-8201__44801a75__2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) ) ROM_REGION( 0x2000, "gfx1", 0 ) // chars + sprites: rearranged by DRIVER_INIT to leave only chars ROM_LOAD( "14.5e", 0x0000, 0x2000, CRC(1b8202b3) SHA1(889b77fc3d0cb029baf8c47be260f513f3ed59bd) ) @@ -897,7 +897,7 @@ ROM_START( champbb2 ) // the pcb has a 8302 on it, though only the 8201 instructions are used ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "8302.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) ) + ROM_LOAD( "alpha-8302__44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) ) ROM_REGION( 0x2000, "gfx1", 0 ) // chars + sprites: rearranged by DRIVER_INIT to leave only chars ROM_LOAD( "epr5936", 0x0000, 0x2000, CRC(c4a4df75) SHA1(7b85dbf405697b0b8881f910c08f6db6c828b19a) ) @@ -925,7 +925,7 @@ ROM_START( champbb2a ) // the pcb has a 8302 on it, though only the 8201 instructions are used ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "8302.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) ) + ROM_LOAD( "alpha-8302__44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) ) ROM_REGION( 0x2000, "gfx1", 0 ) // chars + sprites: rearranged by DRIVER_INIT to leave only chars ROM_LOAD( "epr5936", 0x0000, 0x2000, CRC(c4a4df75) SHA1(7b85dbf405697b0b8881f910c08f6db6c828b19a) ) @@ -953,7 +953,7 @@ ROM_START( champbb2j ) // the pcb has a 8302 on it, though only the 8201 instructions are used ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "8302.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) ) + ROM_LOAD( "alpha-8302__44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) ) ROM_REGION( 0x2000, "gfx1", 0 ) // chars + sprites: rearranged by DRIVER_INIT to leave only chars ROM_LOAD( "4.6a", 0x0000, 0x2000, CRC(c4a4df75) SHA1(7b85dbf405697b0b8881f910c08f6db6c828b19a) ) diff --git a/src/mame/drivers/shougi.c b/src/mame/drivers/shougi.c index 176c4e56b4a..308c63817c0 100644 --- a/src/mame/drivers/shougi.c +++ b/src/mame/drivers/shougi.c @@ -459,7 +459,7 @@ ROM_START( shougi ) /* shougi has one socket empty */ ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "8201.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) ) + ROM_LOAD( "alpha-8201__44801a75__2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) ) ROM_REGION( 0x0020, "proms", 0 ) ROM_LOAD( "pr.2l", 0x0000, 0x0020, CRC(cd3559ff) SHA1(a1291b06a8a337943660b2ef62c94c49d58a6fb5) ) @@ -481,7 +481,7 @@ ROM_START( shougi2 ) ROM_LOAD( "10-2.3l", 0x5000, 0x1000, CRC(a26385fd) SHA1(2adb21bb4f67a378014bc1edda48daca349d17e1) ) ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "8201.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) ) + ROM_LOAD( "alpha-8201__44801a75__2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) ) ROM_REGION( 0x0020, "proms", 0 ) ROM_LOAD( "pr.2l", 0x0000, 0x0020, CRC(cd3559ff) SHA1(a1291b06a8a337943660b2ef62c94c49d58a6fb5) ) -- cgit v1.2.3 From 767d7a8833b7fde420e40aec045cae935f9d2b97 Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Fri, 13 Feb 2015 12:09:22 -0500 Subject: whoops, missed this (n/w) --- src/mame/drivers/equites.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/mame/drivers/equites.c b/src/mame/drivers/equites.c index 46f50ae7035..275484db355 100644 --- a/src/mame/drivers/equites.c +++ b/src/mame/drivers/equites.c @@ -1285,7 +1285,7 @@ Note: CPU - Main PCB Main processor - 68000 2.988MHz -Video processor - ALPHA-8303 custom +Protection processor - ALPHA-8303 custom Sound processor - 8085 3.073MHz - TMP8155 RIOTs (RAM & I/O Timers) @@ -1310,7 +1310,7 @@ ROM_START( equites ) ROM_LOAD( "ev4.1h", 0x06000, 0x2000, CRC(b7917264) SHA1(e58345fda088b171fd348959de15082f3cb42514) ) ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "8303.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) + ROM_LOAD( "alpha-8303__44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) ROM_REGION( 0x1000, "gfx1", 0 ) // chars ROM_LOAD( "ep9", 0x00000, 0x1000, CRC(0325be11) SHA1(d95667b439e3d97b08efeaf08022348546a4f385) ) @@ -1374,7 +1374,7 @@ ROM_START( equitess ) ROM_LOAD( "ev4.1h", 0x06000, 0x2000, CRC(b7917264) SHA1(e58345fda088b171fd348959de15082f3cb42514) ) ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "8303.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) + ROM_LOAD( "alpha-8303__44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) ROM_REGION( 0x1000, "gfx1", 0 ) // chars ROM_LOAD( "epr-ep0.3e", 0x00000, 0x1000, CRC(3f5a81c3) SHA1(8fd5bc621f483bfa46be7e40e6480b25243bdf70) ) @@ -1432,7 +1432,7 @@ ROM_START( bullfgtr ) ROM_LOAD( "hv4vr.bin", 0x06000, 0x2000, CRC(62c7a25b) SHA1(237d3cbdfbf45b33c2f65d30faba151380866a93) ) ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "8303.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) + ROM_LOAD( "alpha-8303__44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) ROM_REGION( 0x1000, "gfx1", 0 ) // chars ROM_LOAD( "h.bin", 0x000000, 0x1000, CRC(c6894c9a) SHA1(0d5a55cded4fd833211bdc733a78c6c8423897de) ) @@ -1514,7 +1514,7 @@ ROM_START( bullfgtrs ) ROM_LOAD( "hv4vr.bin", 0x06000, 0x2000, CRC(62c7a25b) SHA1(237d3cbdfbf45b33c2f65d30faba151380866a93) ) ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "8303.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) + ROM_LOAD( "alpha-8303__44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) ROM_REGION( 0x1000, "gfx1", 0 ) // chars ROM_LOAD( "h.bin", 0x000000, 0x1000, CRC(c6894c9a) SHA1(0d5a55cded4fd833211bdc733a78c6c8423897de) ) @@ -1712,7 +1712,7 @@ ROM_START( splndrbt ) ROM_LOAD( "4_v.1h", 0x06000, 0x2000, CRC(10f45af4) SHA1(00fa599bad8bf3ba6deee54165f381403096e8f9) ) ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "8303.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) + ROM_LOAD( "alpha-8303__44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) ROM_REGION( 0x2000, "gfx1", 0 ) // chars ROM_LOAD( "10.8c", 0x00000, 0x2000, CRC(501887d4) SHA1(3cf4401d6fddff1500066219a71ac3b30ecbdd28) ) @@ -1777,6 +1777,9 @@ ROM_START( hvoltage ) ROM_LOAD( "6_v.1h", 0x04000, 0x4000, CRC(e9542211) SHA1(482f2c90e842fe5cc31cc6a39025adf65ba47ce9) ) ROM_LOAD( "7_v.1e", 0x08000, 0x4000, CRC(44d38554) SHA1(6765971376eafa218fda1accb1e173a7c1850cc8) ) + ROM_REGION( 0x2000, "mcu", 0 ) + ROM_LOAD( "alpha-8304__44801bxx.bin", 0x0000, 0x2000, NO_DUMP ) + ROM_REGION( 0x2000, "gfx1", 0 ) // chars ROM_LOAD( "5.8c", 0x00000, 0x2000, CRC(656d53cd) SHA1(9971ed7e7da0e8bf46e97e8f75a2c2201b33fc2f) ) -- cgit v1.2.3 From 96865a32abfcacc7042ecbc4922ab8efc48738a7 Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Fri, 13 Feb 2015 12:14:22 -0500 Subject: (MESS) advision.c: Change Adventure Vision MCU ROM names to better reflect actual chip labels. [Lord Nightmare] --- src/mess/drivers/advision.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mess/drivers/advision.c b/src/mess/drivers/advision.c index 5d808387a9a..5ecef4b6934 100644 --- a/src/mess/drivers/advision.c +++ b/src/mess/drivers/advision.c @@ -105,10 +105,10 @@ MACHINE_CONFIG_END ROM_START( advision ) ROM_REGION( 0x1000, I8048_TAG, ROMREGION_ERASE00 ) - ROM_LOAD( "avbios.u5", 0x000, 0x400, CRC(279e33d1) SHA1(bf7b0663e9125c9bfb950232eab627d9dbda8460) ) + ROM_LOAD( "b225__ins8048-11kdp_n.u5", 0x000, 0x400, CRC(279e33d1) SHA1(bf7b0663e9125c9bfb950232eab627d9dbda8460) ) // " /B225 \\ INS8048-11KDP/N" ROM_REGION( 0x200, COP411_TAG, 0 ) - ROM_LOAD( "avsound.u8", 0x000, 0x200, CRC(81e95975) SHA1(8b6f8c30dd3e9d8e43f1ea20fba2361b383790eb) ) + ROM_LOAD( "b8223__cop411l-kcn_n.u8", 0x000, 0x200, CRC(81e95975) SHA1(8b6f8c30dd3e9d8e43f1ea20fba2361b383790eb) ) // " /B8223 \\ COP411L-KCN/N" ROM_END /* Game Driver */ -- cgit v1.2.3 From 97e58ca2debac474a444cc95e6cf1a54abc9d45b Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 13 Feb 2015 20:54:44 +0100 Subject: test layout stuff --- src/mess/layout/alnchase.lay | 178 ++++++++++++++++++++++-- src/mess/layout/edracula.lay | 172 +++++++++++++++++++++-- src/mess/layout/tmtennis.lay | 324 +++++++++++++++++++++---------------------- src/mess/layout/wildfire.lay | 7 +- 4 files changed, 491 insertions(+), 190 deletions(-) diff --git a/src/mess/layout/alnchase.lay b/src/mess/layout/alnchase.lay index 59ddac58d3e..16d4bdae325 100644 --- a/src/mess/layout/alnchase.lay +++ b/src/mess/layout/alnchase.lay @@ -5,27 +5,183 @@ - - - - - - - + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + diff --git a/src/mess/layout/edracula.lay b/src/mess/layout/edracula.lay index 448ceef4342..174b8dbb090 100644 --- a/src/mess/layout/edracula.lay +++ b/src/mess/layout/edracula.lay @@ -5,31 +5,173 @@ - - - - - - - - - - - + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + diff --git a/src/mess/layout/tmtennis.lay b/src/mess/layout/tmtennis.lay index 1c836ddb7f6..fd9c855ab27 100644 --- a/src/mess/layout/tmtennis.lay +++ b/src/mess/layout/tmtennis.lay @@ -5,177 +5,177 @@ - - - + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mess/layout/wildfire.lay b/src/mess/layout/wildfire.lay index 8ad3454ce01..51d25ca1fa0 100644 --- a/src/mess/layout/wildfire.lay +++ b/src/mess/layout/wildfire.lay @@ -17,15 +17,17 @@ - + - + + + @@ -143,5 +145,6 @@ + -- cgit v1.2.3 From 70c89a6ef236637752c9c0ffe7473884232ff5f4 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 13 Feb 2015 21:02:01 +0100 Subject: (MESS)New Working Game Added ---------------------- Tomy Alien Chase [hap, Kevin Horton] --- src/mess/drivers/alnchase.c | 159 +++++++++++++++++++++++++++++++++++++++++++- src/mess/drivers/wildfire.c | 6 +- 2 files changed, 162 insertions(+), 3 deletions(-) diff --git a/src/mess/drivers/alnchase.c b/src/mess/drivers/alnchase.c index c09b567691b..430df789198 100644 --- a/src/mess/drivers/alnchase.c +++ b/src/mess/drivers/alnchase.c @@ -5,8 +5,16 @@ Tomy Alien Chase (manufactured in Japan) * boards are labeled TN-16 * NEC uCOM-43 MCU, labeled D553C 258 - * red/green VFD display with color overlay, 2-sided (opposing player sees a mirrored image) + * red/green VFD display with color overlay, 2-sided* + + *Player one views the VFD from the front (grid+filament side) while the + opposite player views it from the back side (through the conductive traces), + basically a mirror-image. + + This is a space-themed tabletop VFD electronic game. To start, simply + press [UP]. Hold a joystick direction to move around. + NOTE!: MESS external artwork is required to be able to play ***************************************************************************/ @@ -23,18 +31,145 @@ public: alnchase_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), + m_button_matrix(*this, "IN"), m_speaker(*this, "speaker") { } required_device m_maincpu; + required_ioport_array<2> m_button_matrix; required_device m_speaker; + UINT8 m_input_mux; + UINT32 m_plate; + UINT16 m_grid; + + DECLARE_READ8_MEMBER(input_r); + DECLARE_WRITE8_MEMBER(display_w); + DECLARE_WRITE8_MEMBER(port_e_w); + + UINT32 m_vfd_state[0x10]; + void update_vfd(); + virtual void machine_start(); }; +/*************************************************************************** + + Display + +***************************************************************************/ + +void alnchase_state::update_vfd() +{ + for (int i = 0; i < 9; i++) + if (m_grid & (1 << i) && m_vfd_state[i] != m_plate) + { + // on difference, send to output + for (int j = 0; j < 17; j++) + output_set_lamp_value(i*100 + j, m_plate >> j & 1); + + m_vfd_state[i] = m_plate; + } +} + + + +/*************************************************************************** + + I/O + +***************************************************************************/ + +READ8_MEMBER(alnchase_state::input_r) +{ + UINT8 inp = 0; + + // read selected button rows + for (int i = 0; i < 2; i++) + if (m_input_mux >> i & 1) + inp |= m_button_matrix[i]->read(); + + return inp; +} + +WRITE8_MEMBER(alnchase_state::display_w) +{ + int shift; + + if (offset <= NEC_UCOM4_PORTE) + { + // C/D/E0: vfd matrix grid + shift = (offset - NEC_UCOM4_PORTC) * 4; + m_grid = (m_grid & ~(0xf << shift)) | (data << shift); + + // C0(grid 0): input enable PL1 + // D0(grid 4): input enable PL2 + m_input_mux = (m_grid & 1) | (m_grid >> 3 & 2); + } + + if (offset >= NEC_UCOM4_PORTE) + { + // E23/F/G/H/I: vfd matrix plate + shift = (offset - NEC_UCOM4_PORTE) * 4; + m_plate = ((m_plate << 2 & ~(0xf << shift)) | (data << shift)) >> 2; + } + + update_vfd(); +} + +WRITE8_MEMBER(alnchase_state::port_e_w) +{ + display_w(space, offset, data); + + // E1: speaker out + m_speaker->level_w(data >> 1 & 1); +} + + + +/*************************************************************************** + + Inputs + +***************************************************************************/ + +/* physical button layout and labels is like this: + + POWER SOUND LEVEL PLAYER + ON ON PRO TWO START + o o | | + | | | | [joystick] + | | o o + OFF OFF AMA ONE GAME 0,1,2,3 + + 1 PLAYER SIDE + + other player side only has a joystick +*/ + static INPUT_PORTS_START( alnchase ) + PORT_START("IN.0") // C0 port A + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) + + PORT_START("IN.1") // D0 port A + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) // on non-mirrored view, swap P2 left/right + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) // " + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) + + PORT_START("SW") // port B + PORT_CONFNAME( 0x01, 0x01, "Players" ) + PORT_CONFSETTING( 0x01, "1" ) + PORT_CONFSETTING( 0x00, "2" ) + PORT_CONFNAME( 0x02, 0x00, DEF_STR( Difficulty ) ) + PORT_CONFSETTING( 0x00, "Amateur" ) + PORT_CONFSETTING( 0x02, "Professional" ) + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END @@ -47,6 +182,17 @@ INPUT_PORTS_END void alnchase_state::machine_start() { + // zerofill + memset(m_vfd_state, 0, sizeof(m_vfd_state)); + m_input_mux = 0; + m_plate = 0; + m_grid = 0; + + // register for savestates + save_item(NAME(m_vfd_state)); + save_item(NAME(m_input_mux)); + save_item(NAME(m_plate)); + save_item(NAME(m_grid)); } @@ -54,6 +200,15 @@ static MACHINE_CONFIG_START( alnchase, alnchase_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_400kHz) + MCFG_UCOM4_READ_A_CB(READ8(alnchase_state, input_r)) + MCFG_UCOM4_READ_B_CB(IOPORT("SW")) + MCFG_UCOM4_WRITE_C_CB(WRITE8(alnchase_state, display_w)) + MCFG_UCOM4_WRITE_D_CB(WRITE8(alnchase_state, display_w)) + MCFG_UCOM4_WRITE_E_CB(WRITE8(alnchase_state, port_e_w)) + MCFG_UCOM4_WRITE_F_CB(WRITE8(alnchase_state, display_w)) + MCFG_UCOM4_WRITE_G_CB(WRITE8(alnchase_state, display_w)) + MCFG_UCOM4_WRITE_H_CB(WRITE8(alnchase_state, display_w)) + MCFG_UCOM4_WRITE_I_CB(WRITE8(alnchase_state, display_w)) MCFG_DEFAULT_LAYOUT(layout_alnchase) @@ -79,4 +234,4 @@ ROM_START( alnchase ) ROM_END -CONS( 1984, alnchase, 0, 0, alnchase, alnchase, driver_device, 0, "Tomy", "Alien Chase", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) +CONS( 1984, alnchase, 0, 0, alnchase, alnchase, driver_device, 0, "Tomy", "Alien Chase", GAME_NOT_WORKING ) diff --git a/src/mess/drivers/wildfire.c b/src/mess/drivers/wildfire.c index fa74136c4a8..93e66e5d31d 100644 --- a/src/mess/drivers/wildfire.c +++ b/src/mess/drivers/wildfire.c @@ -5,7 +5,11 @@ Parker Brothers Wildfire, by Bob and Holly Doyle (prototype), and Garry Kitchen * AMI S2150, labeled C10641 - x + This is an electronic handheld pinball game. It has dozens of small leds + to create the illusion of a moving ball, and even the flippers are leds. + A drawing of a pinball table is added as overlay. + + NOTE!: MESS external artwork is required to be able to play TODO: -- cgit v1.2.3