summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/fidel6502.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/fidel6502.cpp')
-rw-r--r--src/mame/drivers/fidel6502.cpp93
1 files changed, 58 insertions, 35 deletions
diff --git a/src/mame/drivers/fidel6502.cpp b/src/mame/drivers/fidel6502.cpp
index 986aea6c478..799abe314f7 100644
--- a/src/mame/drivers/fidel6502.cpp
+++ b/src/mame/drivers/fidel6502.cpp
@@ -18,7 +18,6 @@
Currently, a dummy timer workaround is needed, or it's much worse.
Is the problem here is due to timing of CPU addressbus changes? We can only 'sense'
the addressbus at read or write accesses.
- - EAG missing bankswitch? where is the 2nd half of the 32KB ROM used, if at all?
- granits gives error beeps at start, need to press clear to play
- finish fphantom emulation
- PC has 14KB RAM. 0000-0fff and 8000-9fff is certain, where does the remaining map to?
@@ -474,11 +473,13 @@ public:
fidel6502_state(const machine_config &mconfig, device_type type, const char *tag)
: fidelbase_state(mconfig, type, tag),
m_ppi8255(*this, "ppi8255"),
+ m_rombank(*this, "rombank"),
m_sc12_map(*this, "sc12_map")
{ }
// devices/pointers
optional_device<i8255_device> m_ppi8255;
+ optional_memory_bank m_rombank;
optional_device<address_map_bank_device> m_sc12_map;
TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE); }
@@ -517,6 +518,7 @@ public:
DECLARE_WRITE8_MEMBER(eas_ppi_porta_w);
DECLARE_READ8_MEMBER(eas_ppi_portb_r);
DECLARE_WRITE8_MEMBER(eas_ppi_portc_w);
+ void init_eag();
void eas_map(address_map &map);
void eag_map(address_map &map);
void pc_map(address_map &map);
@@ -775,6 +777,11 @@ READ8_MEMBER(fidel6502_state::eas_input_r)
return read_inputs(9) ^ 0xff;
}
+void fidel6502_state::init_eag()
+{
+ m_rombank->configure_entries(0, 4, memregion("rombank")->base(), 0x2000);
+}
+
// 8255 PPI (PC: done with TTL instead)
@@ -806,7 +813,9 @@ WRITE8_MEMBER(fidel6502_state::eas_ppi_portc_w)
// d5: lower TSI volume
m_speech->set_output_gain(0, (data & 0x20) ? 0.5 : 1.0);
- // d6,d7: N/C?
+ // d6,d7: bookrom bankswitch (model EAG)
+ if (m_rombank != nullptr)
+ m_rombank->set_entry(data >> 6 & 3);
}
READ8_MEMBER(fidel6502_state::eas_ppi_portb_r)
@@ -1106,7 +1115,7 @@ WRITE8_MEMBER(fidel6502_state::fdesdis_control_w)
display_matrix(9, 2, m_inp_mux, ~m_led_select & 3, false);
// 74259 Q2: book rom A14
- membank("bank1")->set_entry(~m_led_select >> 2 & 1);
+ m_rombank->set_entry(~m_led_select >> 2 & 1);
// 74259 Q3: lcd common, update on rising edge
if (~q3_old & m_led_select & 8)
@@ -1139,7 +1148,7 @@ READ8_MEMBER(fidel6502_state::fdesdis_input_r)
void fidel6502_state::init_fdesdis()
{
- membank("bank1")->configure_entries(0, 2, memregion("user1")->base(), 0x4000);
+ m_rombank->configure_entries(0, 2, memregion("rombank")->base(), 0x4000);
}
@@ -1153,12 +1162,12 @@ void fidel6502_state::init_fdesdis()
MACHINE_RESET_MEMBER(fidel6502_state, fphantom)
{
fidelbase_state::machine_reset();
- membank("bank1")->set_entry(0);
+ m_rombank->set_entry(0);
}
void fidel6502_state::init_fphantom()
{
- membank("bank1")->configure_entries(0, 2, memregion("user1")->base(), 0x4000);
+ m_rombank->configure_entries(0, 2, memregion("rombank")->base(), 0x4000);
}
@@ -1186,7 +1195,7 @@ WRITE8_MEMBER(fidel6502_state::chesster_control_w)
// 74259 Q2,Q3: speechrom A14,A15
// a0-a2,d0: 74259(2) where Q3 is speechrom A16, other outputs unconnected
m_speech_bank = (m_speech_bank & ~mask) | ((data & 1) ? mask : 0);
- membank("bank1")->set_entry((m_led_select >> 2 & 3) | (m_speech_bank >> 1 & 4));
+ m_rombank->set_entry((m_led_select >> 2 & 3) | (m_speech_bank >> 1 & 4));
}
WRITE8_MEMBER(fidel6502_state::kishon_control_w)
@@ -1195,12 +1204,12 @@ WRITE8_MEMBER(fidel6502_state::kishon_control_w)
// 2 more bankswitch bits: 74259(2) Q2 to A17, Q0 to A18
u8 bank = (m_led_select >> 2 & 3) | bitswap<3>(m_speech_bank, 0,2,3) << 2;
- membank("bank1")->set_entry(bank);
+ m_rombank->set_entry(bank);
}
void fidel6502_state::init_chesster()
{
- membank("bank1")->configure_entries(0, memregion("user1")->bytes() / 0x4000, memregion("user1")->base(), 0x4000);
+ m_rombank->configure_entries(0, memregion("rombank")->bytes() / 0x4000, memregion("rombank")->base(), 0x4000);
}
@@ -1266,7 +1275,9 @@ void fidel6502_state::eag_map(address_map &map)
map(0x7020, 0x7027).w(this, FUNC(fidel6502_state::eas_segment_w)).nopr();
map(0x7030, 0x7037).w(this, FUNC(fidel6502_state::eas_led_w)).nopr();
map(0x7050, 0x7050).r(this, FUNC(fidel6502_state::eas_input_r));
- map(0x8000, 0xffff).rom(); //.nopw()
+ map(0x8000, 0x9fff).rom(); //.nopw()
+ map(0xa000, 0xbfff).bankr("rombank");
+ map(0xc000, 0xffff).rom();
}
void fidel6502_state::pc_map(address_map &map)
@@ -1368,7 +1379,7 @@ void fidel6502_state::fdesdis_map(address_map &map)
{
map(0x0000, 0x1fff).ram();
map(0x2000, 0x2007).mirror(0x1ff8).rw(this, FUNC(fidel6502_state::fdesdis_input_r), FUNC(fidel6502_state::fdesdis_control_w));
- map(0x4000, 0x7fff).bankr("bank1");
+ map(0x4000, 0x7fff).bankr("rombank");
map(0x6000, 0x6007).mirror(0x1ff8).w(this, FUNC(fidel6502_state::fdesdis_lcd_w));
map(0x8000, 0xffff).rom();
}
@@ -1376,7 +1387,7 @@ void fidel6502_state::fdesdis_map(address_map &map)
void fidel6502_state::fphantom_map(address_map &map)
{
map(0x0000, 0x1fff).ram();
- map(0x4000, 0x7fff).bankr("bank1");
+ map(0x4000, 0x7fff).bankr("rombank");
map(0x8000, 0xffff).rom();
}
@@ -1384,7 +1395,7 @@ void fidel6502_state::chesster_map(address_map &map)
{
map(0x0000, 0x1fff).ram();
map(0x2000, 0x2007).mirror(0x1ff8).rw(this, FUNC(fidel6502_state::fdesdis_input_r), FUNC(fidel6502_state::chesster_control_w));
- map(0x4000, 0x7fff).bankr("bank1");
+ map(0x4000, 0x7fff).bankr("rombank");
map(0x6000, 0x6000).mirror(0x1fff).w("dac8", FUNC(dac_byte_interface::write));
map(0x8000, 0xffff).rom();
}
@@ -2535,10 +2546,13 @@ ROM_END
ROM_START( feag2100 )
+ ROM_REGION( 0x8000, "rombank", 0 )
+ ROM_LOAD("el2100.1", 0x0000, 0x8000, CRC(9b62b7d5) SHA1(cfcaea2e36c2d52fe4a85c77dbc7fa135893860c) )
+
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("el2100.1", 0x8000, 0x8000, CRC(9b62b7d5) SHA1(cfcaea2e36c2d52fe4a85c77dbc7fa135893860c) )
- ROM_LOAD("el2100.2", 0xc000, 0x2000, CRC(76fec42f) SHA1(34660edb8458919fd179e93fdab3fe428a6625d0) )
- ROM_LOAD("el2100.3", 0xe000, 0x2000, CRC(2079a506) SHA1(a7bb83138c7b6eff6ea96702d453a214697f4890) )
+ ROM_COPY("rombank", 0, 0x8000, 0x2000)
+ ROM_LOAD("el2100.2", 0xc000, 0x2000, CRC(76fec42f) SHA1(34660edb8458919fd179e93fdab3fe428a6625d0) )
+ ROM_LOAD("el2100.3", 0xe000, 0x2000, CRC(2079a506) SHA1(a7bb83138c7b6eff6ea96702d453a214697f4890) )
ROM_REGION( 0x2000, "speech", 0 )
ROM_LOAD("101-32107", 0x0000, 0x1000, BAD_DUMP CRC(f35784f9) SHA1(348e54a7fa1e8091f89ac656b4da22f28ca2e44d) ) // taken from csc, assume correct
@@ -2546,30 +2560,39 @@ ROM_START( feag2100 )
ROM_END
ROM_START( feag2100sp )
+ ROM_REGION( 0x8000, "rombank", 0 )
+ ROM_LOAD("el2100.1", 0x0000, 0x8000, CRC(9b62b7d5) SHA1(cfcaea2e36c2d52fe4a85c77dbc7fa135893860c) )
+
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("el2100.1", 0x8000, 0x8000, CRC(9b62b7d5) SHA1(cfcaea2e36c2d52fe4a85c77dbc7fa135893860c) )
- ROM_LOAD("el2100.2", 0xc000, 0x2000, CRC(76fec42f) SHA1(34660edb8458919fd179e93fdab3fe428a6625d0) )
- ROM_LOAD("el2100.3", 0xe000, 0x2000, CRC(2079a506) SHA1(a7bb83138c7b6eff6ea96702d453a214697f4890) )
+ ROM_COPY("rombank", 0, 0x8000, 0x2000)
+ ROM_LOAD("el2100.2", 0xc000, 0x2000, CRC(76fec42f) SHA1(34660edb8458919fd179e93fdab3fe428a6625d0) )
+ ROM_LOAD("el2100.3", 0xe000, 0x2000, CRC(2079a506) SHA1(a7bb83138c7b6eff6ea96702d453a214697f4890) )
ROM_REGION( 0x2000, "speech", 0 )
ROM_LOAD("101-64106", 0x0000, 0x2000, BAD_DUMP CRC(8766e128) SHA1(78c7413bf240159720b131ab70bfbdf4e86eb1e9) ) // taken from vcc/fexcelv, assume correct
ROM_END
ROM_START( feag2100g )
+ ROM_REGION( 0x8000, "rombank", 0 )
+ ROM_LOAD("el2100.1", 0x0000, 0x8000, CRC(9b62b7d5) SHA1(cfcaea2e36c2d52fe4a85c77dbc7fa135893860c) )
+
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("el2100.1", 0x8000, 0x8000, CRC(9b62b7d5) SHA1(cfcaea2e36c2d52fe4a85c77dbc7fa135893860c) )
- ROM_LOAD("el2100.2", 0xc000, 0x2000, CRC(76fec42f) SHA1(34660edb8458919fd179e93fdab3fe428a6625d0) )
- ROM_LOAD("el2100.3", 0xe000, 0x2000, CRC(2079a506) SHA1(a7bb83138c7b6eff6ea96702d453a214697f4890) )
+ ROM_COPY("rombank", 0, 0x8000, 0x2000)
+ ROM_LOAD("el2100.2", 0xc000, 0x2000, CRC(76fec42f) SHA1(34660edb8458919fd179e93fdab3fe428a6625d0) )
+ ROM_LOAD("el2100.3", 0xe000, 0x2000, CRC(2079a506) SHA1(a7bb83138c7b6eff6ea96702d453a214697f4890) )
ROM_REGION( 0x2000, "speech", 0 )
ROM_LOAD("101-64101", 0x0000, 0x2000, BAD_DUMP CRC(6c85e310) SHA1(20d1d6543c1e6a1f04184a2df2a468f33faec3ff) ) // taken from fexcelv, assume correct
ROM_END
ROM_START( feag2100fr )
+ ROM_REGION( 0x8000, "rombank", 0 )
+ ROM_LOAD("el2100.1", 0x0000, 0x8000, CRC(9b62b7d5) SHA1(cfcaea2e36c2d52fe4a85c77dbc7fa135893860c) )
+
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("el2100.1", 0x8000, 0x8000, CRC(9b62b7d5) SHA1(cfcaea2e36c2d52fe4a85c77dbc7fa135893860c) )
- ROM_LOAD("el2100.2", 0xc000, 0x2000, CRC(76fec42f) SHA1(34660edb8458919fd179e93fdab3fe428a6625d0) )
- ROM_LOAD("el2100.3", 0xe000, 0x2000, CRC(2079a506) SHA1(a7bb83138c7b6eff6ea96702d453a214697f4890) )
+ ROM_COPY("rombank", 0, 0x8000, 0x2000)
+ ROM_LOAD("el2100.2", 0xc000, 0x2000, CRC(76fec42f) SHA1(34660edb8458919fd179e93fdab3fe428a6625d0) )
+ ROM_LOAD("el2100.3", 0xe000, 0x2000, CRC(2079a506) SHA1(a7bb83138c7b6eff6ea96702d453a214697f4890) )
ROM_REGION( 0x2000, "speech", 0 )
ROM_LOAD("101-64105", 0x0000, 0x2000, BAD_DUMP CRC(fe8c5c18) SHA1(2b64279ab3747ee81c86963c13e78321c6cfa3a3) ) // taken from fexcelv, assume correct
@@ -2688,7 +2711,7 @@ ROM_START( fdes2100d ) // model 6106, PCB label 510.1130A01. The 'rev B' dump ca
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("i9_orange.ic9", 0x8000, 0x8000, CRC(83fec02a) SHA1(6f43ab05bc605061989b05d0592dbd184efff9d4) ) // WSI 27C256L-12
- ROM_REGION( 0x8000, "user1", 0 )
+ ROM_REGION( 0x8000, "rombank", 0 )
ROM_LOAD("bk3_white.ic10", 0x0000, 0x8000, CRC(3857cc35) SHA1(f073dafb9fd885c7ddb7fbff10e3653f343ef1c6) ) // WSI 27C256L-12
ROM_END
@@ -2696,7 +2719,7 @@ ROM_START( fdes2000d ) // model 6105, PCB label 510.1130A01
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("27c256.ic9", 0x8000, 0x8000, CRC(b136d1a1) SHA1(8438790a62f45284ff33a0255c5c89f526726d3e) ) // 27C256, no label
- ROM_REGION( 0x8000, "user1", ROMREGION_ERASEFF ) // no rom in ic10
+ ROM_REGION( 0x8000, "rombank", ROMREGION_ERASEFF ) // no rom in ic10
ROM_END
@@ -2704,7 +2727,7 @@ ROM_START( fphantom ) // model 6100, PCB label 510.1128A01
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("u_3c_yellow.u3", 0x8000, 0x8000, CRC(fb7c38ae) SHA1(a1aa7637705052cb4eec92644dc79aee7ba4d77c) ) // 27C256
- ROM_REGION( 0x8000, "user1", 0 )
+ ROM_REGION( 0x8000, "rombank", 0 )
ROM_LOAD("u_4_white.u4", 0x0000, 0x8000, CRC(e4181ba2) SHA1(1f77d1867c6f566be98645fc252a01108f412c96) ) // 27C256
ROM_END
@@ -2713,7 +2736,7 @@ ROM_START( chesster ) // model 6120, PCB label 510.1141C01
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("ch_1.3.ic9", 0x8000, 0x8000, CRC(8b42d1ad) SHA1(2161fc5ab2476fe7ca4ffc226e3cb329b8a57a01) ) // 27256, CH 1.3 on sticker
- ROM_REGION( 0x20000, "user1", 0 )
+ ROM_REGION( 0x20000, "rombank", 0 )
ROM_LOAD("101-1091b02.ic10", 0x0000, 0x20000, CRC(fa370e88) SHA1(a937c8f1ec295cf9539d12466993974e40771493) ) // AMI, 27C010 or equivalent
ROM_END
@@ -2721,7 +2744,7 @@ ROM_START( chesstera ) // model 6120, PCB label 510.1141C01
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("chesster.ic9", 0x8000, 0x8000, CRC(29f9a698) SHA1(4c83ca46fd5fc9c40302e9c7f16b4ae2c18b06e6) ) // M27C256B, sticker but no label
- ROM_REGION( 0x20000, "user1", 0 )
+ ROM_REGION( 0x20000, "rombank", 0 )
ROM_LOAD("101-1091a02.ic10", 0x0000, 0x20000, CRC(2b4d243c) SHA1(921e51978facb502b207b4f64a73b1e74127e826) ) // AMI, 27C010 or equivalent
ROM_END
@@ -2729,7 +2752,7 @@ ROM_START( kishon ) // model 6120G or 6127(same), PCB label 510.1141C01
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("kishon.ic9", 0x8000, 0x8000, CRC(121c007f) SHA1(652e9ea47b6bb1632d10eb0fcd7f98cdba22fce7) ) // 27C256
- ROM_REGION( 0x80000, "user1", 0 )
+ ROM_REGION( 0x80000, "rombank", 0 )
ROM_LOAD("kishon_v2.6_1-14-91.ic10", 0x0000, 0x80000, CRC(50598869) SHA1(2087e0c2f40a2408fe217a6502c8c3a247bdd063) ) // Toshiba TC544000P-12, aka 101-1094A01
ROM_END
@@ -2770,10 +2793,10 @@ CONS( 1983, fpresbusp, fpres, 0, pc, eassp, fidel6502_state, empt
CONS( 1983, fpresbug, fpres, 0, pc, easg, fidel6502_state, empty_init, "Fidelity Electronics", "Prestige Challenger (Budapest program, German)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )
CONS( 1983, fpresbufr, fpres, 0, pc, easfr, fidel6502_state, empty_init, "Fidelity Electronics", "Prestige Challenger (Budapest program, French)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )
-CONS( 1986, feag2100, 0, 0, eag, eag, fidel6502_state, empty_init, "Fidelity Electronics", "Elite Avant Garde 2100 (English)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )
-CONS( 1986, feag2100sp, feag2100, 0, eag, eagsp, fidel6502_state, empty_init, "Fidelity Electronics", "Elite Avant Garde 2100 (Spanish)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )
-CONS( 1986, feag2100g, feag2100, 0, eag, eagg, fidel6502_state, empty_init, "Fidelity Electronics", "Elite Avant Garde 2100 (German)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )
-CONS( 1986, feag2100fr, feag2100, 0, eag, eagfr, fidel6502_state, empty_init, "Fidelity Electronics", "Elite Avant Garde 2100 (French)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )
+CONS( 1986, feag2100, 0, 0, eag, eag, fidel6502_state, init_eag, "Fidelity Electronics", "Elite Avant Garde 2100 (English)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )
+CONS( 1986, feag2100sp, feag2100, 0, eag, eagsp, fidel6502_state, init_eag, "Fidelity Electronics", "Elite Avant Garde 2100 (Spanish)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )
+CONS( 1986, feag2100g, feag2100, 0, eag, eagg, fidel6502_state, init_eag, "Fidelity Electronics", "Elite Avant Garde 2100 (German)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )
+CONS( 1986, feag2100fr, feag2100, 0, eag, eagfr, fidel6502_state, init_eag, "Fidelity Electronics", "Elite Avant Garde 2100 (French)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )
CONS( 1982, fscc9, 0, 0, sc9d, sc9, fidel6502_state, empty_init, "Fidelity Electronics", "Sensory Chess Challenger 9 (rev. D)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS ) // aka version "B"
CONS( 1982, fscc9b, fscc9, 0, sc9b, sc9, fidel6502_state, empty_init, "Fidelity Electronics", "Sensory Chess Challenger 9 (rev. B)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )