mirror of
https://github.com/holub/mame
synced 2025-04-18 22:49:58 +03:00
pmd85: cleanup; added sound.
This commit is contained in:
parent
aa1ef0b0f4
commit
830c6299a8
File diff suppressed because it is too large
Load Diff
@ -26,19 +26,19 @@ What's new:
|
||||
Notes on emulation status and to do list:
|
||||
-----------------------------------------
|
||||
|
||||
1. V.24.
|
||||
2. Tape emulation for other machines than PMD-85.1.
|
||||
3. Flash video attribute.
|
||||
4. External interfaces connectors (K2-K5).
|
||||
5. Speaker.
|
||||
6. Verify PMD-85.2A, PMD-85.3, Didaktik Alfa and Mato monitor roms.
|
||||
7. Verify all Basic roms.
|
||||
8. 8251 in Didaktik Alfa.
|
||||
9. Colors (if any).
|
||||
10. PMD-85, Didaktik Alfa 2 and Didaktik Beta (ROMs and documentation needed).
|
||||
11. FDD interface (ROMs and disk images needed).
|
||||
12. "Duch & Pampuch" Mato game displays scores with incorrect characters.
|
||||
13. Tape save in pmd851 is badly formatted - cannot be loaded.
|
||||
1. V.24.
|
||||
2. Flash video attribute.
|
||||
3. External interfaces connectors (K2-K5).
|
||||
4. C2717PMD is marked MNW, but there's nothing to say why.
|
||||
5. Verify PMD-85.2A, PMD-85.3, Didaktik Alfa and Mato monitor roms.
|
||||
6. Verify all Basic roms.
|
||||
7. 8251 in Didaktik Alfa.
|
||||
8. Colors (if any). Seems most versions supported 4 colours via RGB connector. But, the TV modulator only carried the G line.
|
||||
The video signals are developed in a forest of gates which may take a while to work out.
|
||||
9. PMD-85, Didaktik Alfa 2 and Didaktik Beta (ROMs and documentation needed).
|
||||
10. FDD interface (ROMs and disk images needed).
|
||||
11. "Duch & Pampuch" Mato game displays scores with incorrect characters.
|
||||
|
||||
|
||||
PMD-85 technical information
|
||||
============================
|
||||
@ -183,47 +183,50 @@ SUB aaaa bb cc dd... - write bytes to memory starting at aaaa with bb,cc,dd...
|
||||
|
||||
Cassette
|
||||
--------
|
||||
The systems belong to 3 groups which are not compatible with each other.
|
||||
- pmd851, alfa
|
||||
- mato
|
||||
- pmd852, pmd852a, pmd852b, pmd853, c2717, c2717pmd
|
||||
|
||||
Cassettes tested with Basic
|
||||
- pmd852,pmd852a,pmd852b,pmd853,c2717,c2717pmd - these can save and load back their own files
|
||||
- pmd851 - won't go into basic
|
||||
- mato,alfa - don't come with basic?
|
||||
- pmd851,mato,alfa - not tested yet.
|
||||
|
||||
Software list items
|
||||
- mato - not compatible
|
||||
- all others - recognise headers of sw-item-tapes, but won't load? Maybe the usage is not understood properly.
|
||||
Getting into Basic:
|
||||
- pmd852,pmd852a,pmd852b,pmd853 : In the Machine Configuration, enable Basic and Reset.
|
||||
- pmd851,alfa : type BASIC 00 (or any parameter)
|
||||
- mato : type BASIC
|
||||
- c2717,c2717pmd : you're already in Basic.
|
||||
- How to get out? Unknown.
|
||||
|
||||
- Some software items will crash the emulator, for example >mame pmd851 bdash
|
||||
Loading a tape:
|
||||
- In the monitor : type MGLD <fn>, where <fn> is the file number, usually 00. File numbers will be shown in the
|
||||
software list usage.
|
||||
- In Basic : type LOAD <fn>, where <fn> is the same as above.
|
||||
- The tape can only be loaded into the environment it's meant for. Otherwise, you'll only get header information
|
||||
followed by a freeze.
|
||||
|
||||
Header information from what I can understand
|
||||
xx/z yyyyyyyy
|
||||
Header information from what I can understand: xx/z yyyyyyyy
|
||||
yyyyyyyy = filename
|
||||
xx = file number
|
||||
z = status code (guesses below)
|
||||
> - only loadable by Basic
|
||||
? - only loadable by the monitor - it gives no clue as to the exec address
|
||||
P - protected? I've had no luck getting one to load
|
||||
yyyyyyyy = filename
|
||||
? - only loadable by the monitor - it gives no clue as to the exec address, but should start by itself if it's
|
||||
been saved correctly.
|
||||
x - other codes are added by the user and have program-specific meanings.
|
||||
|
||||
Software list items: Some work, some don't, and some only work on certain machines. A test with "bludiste"
|
||||
(a monitor program) produced the following:
|
||||
- pmd851,pmd852,pmd852a,pmd852b,alfa - loads and runs
|
||||
- c2717,c2717pmd - recognises and prints the header, but then doesn't load the tape, because the machine is
|
||||
stuck in Basic.
|
||||
- mato,pmd853 - does nothing
|
||||
|
||||
Some software items will crash MAME, for example "bdash".
|
||||
|
||||
*******************************************************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/pmd85.h"
|
||||
|
||||
#include "cpu/i8085/i8085.h"
|
||||
#include "imagedev/cassette.h"
|
||||
#include "machine/i8251.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/pit8253.h"
|
||||
#include "machine/ram.h"
|
||||
|
||||
#include "screen.h"
|
||||
#include "softlist.h"
|
||||
#include "speaker.h"
|
||||
|
||||
#include "formats/pmd_cas.h"
|
||||
|
||||
|
||||
@ -231,7 +234,7 @@ yyyyyyyy = filename
|
||||
// VIDEO EMULATION
|
||||
//**************************************************************************
|
||||
|
||||
uint32_t pmd85_state::screen_update_pmd85(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
uint32_t pmd85_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
for (int y = 0; y < 256; y++)
|
||||
{
|
||||
@ -258,12 +261,12 @@ uint32_t pmd85_state::screen_update_pmd85(screen_device &screen, bitmap_ind16 &b
|
||||
|
||||
/* I/O ports */
|
||||
|
||||
void pmd85_state::pmd85_io_map(address_map &map)
|
||||
void pmd85_state::pmd85_io(address_map &map)
|
||||
{
|
||||
map(0x00, 0xff).rw(FUNC(pmd85_state::pmd85_io_r), FUNC(pmd85_state::pmd85_io_w));
|
||||
map(0x00, 0xff).rw(FUNC(pmd85_state::io_r), FUNC(pmd85_state::io_w));
|
||||
}
|
||||
|
||||
void pmd85_state::mato_io_map(address_map &map)
|
||||
void pmd85_state::mato_io(address_map &map)
|
||||
{
|
||||
map(0x00, 0xff).rw(FUNC(pmd85_state::mato_io_r), FUNC(pmd85_state::mato_io_w));
|
||||
}
|
||||
@ -278,9 +281,7 @@ void pmd85_state::pmd85_mem(address_map &map)
|
||||
map(0x3000, 0x3fff).bankrw("bank4");
|
||||
map(0x4000, 0x7fff).bankrw("bank5");
|
||||
map(0x8000, 0x8fff).bankr("bank6");
|
||||
map(0x9000, 0x9fff).noprw();
|
||||
map(0xa000, 0xafff).bankr("bank7");
|
||||
map(0xb000, 0xbfff).noprw();
|
||||
map(0xc000, 0xffff).bankrw("bank8");
|
||||
}
|
||||
|
||||
@ -318,7 +319,6 @@ void pmd85_state::alfa_mem(address_map &map)
|
||||
map(0x4000, 0x7fff).bankrw("bank4");
|
||||
map(0x8000, 0x8fff).bankr("bank5");
|
||||
map(0x9000, 0xb3ff).bankr("bank6");
|
||||
map(0xb400, 0xbfff).noprw();
|
||||
map(0xc000, 0xffff).bankrw("bank7");
|
||||
}
|
||||
|
||||
@ -518,7 +518,7 @@ static INPUT_PORTS_START( alfa )
|
||||
PORT_INCLUDE( pmd85 )
|
||||
|
||||
PORT_MODIFY( "DSW0" )
|
||||
PORT_BIT( 0x01, 0x00, IPT_UNUSED )
|
||||
PORT_BIT( 0x01, 0x01, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -623,7 +623,7 @@ void pmd85_state::pmd85(machine_config &config, bool with_uart)
|
||||
/* basic machine hardware */
|
||||
I8080(config, m_maincpu, XTAL(18'432'000)/9);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &pmd85_state::pmd85_mem);
|
||||
m_maincpu->set_addrmap(AS_IO, &pmd85_state::pmd85_io_map);
|
||||
m_maincpu->set_addrmap(AS_IO, &pmd85_state::pmd85_io);
|
||||
config.set_maximum_quantum(attotime::from_hz(60));
|
||||
|
||||
|
||||
@ -647,10 +647,10 @@ void pmd85_state::pmd85(machine_config &config, bool with_uart)
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
PIT8253(config, m_pit8253, 0);
|
||||
m_pit8253->set_clk<0>(0);
|
||||
m_pit8253->set_clk<1>(XTAL(18'432'000)/9);
|
||||
m_pit8253->set_clk<2>(1);
|
||||
PIT8253(config, m_pit, 0);
|
||||
m_pit->set_clk<0>(0);
|
||||
m_pit->set_clk<1>(XTAL(18'432'000)/9);
|
||||
m_pit->set_clk<2>(1);
|
||||
|
||||
/* video hardware */
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
@ -659,13 +659,14 @@ void pmd85_state::pmd85(machine_config &config, bool with_uart)
|
||||
screen.set_vblank_time(0);
|
||||
screen.set_size(288, 256);
|
||||
screen.set_visarea(0, 288-1, 0, 256-1);
|
||||
screen.set_screen_update(FUNC(pmd85_state::screen_update_pmd85));
|
||||
screen.set_screen_update(FUNC(pmd85_state::screen_update));
|
||||
screen.set_palette(m_palette);
|
||||
|
||||
PALETTE(config, m_palette, palette_device::MONOCHROME_HIGHLIGHT);
|
||||
|
||||
/* sound hardware */
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);
|
||||
|
||||
/* cassette */
|
||||
CASSETTE(config, m_cassette);
|
||||
@ -687,44 +688,44 @@ void pmd85_state::pmd85(machine_config &config, bool with_uart)
|
||||
}
|
||||
|
||||
/* internal ram */
|
||||
RAM(config, m_ram).set_default_size("64K");
|
||||
RAM(config, m_ram).set_default_size("64K").set_default_value(0x00);
|
||||
}
|
||||
|
||||
void pmd85_state::pmd851(machine_config &config)
|
||||
{
|
||||
pmd85(config);
|
||||
|
||||
I8255(config, m_ppi8255_0, 0);
|
||||
m_ppi8255_0->in_pa_callback().set(FUNC(pmd85_state::pmd85_ppi_0_porta_r));
|
||||
m_ppi8255_0->in_pb_callback().set(FUNC(pmd85_state::pmd85_ppi_0_portb_r));
|
||||
m_ppi8255_0->in_pc_callback().set(FUNC(pmd85_state::pmd85_ppi_0_portc_r));
|
||||
m_ppi8255_0->out_pa_callback().set(FUNC(pmd85_state::pmd85_ppi_0_porta_w));
|
||||
m_ppi8255_0->out_pb_callback().set(FUNC(pmd85_state::pmd85_ppi_0_portb_w));
|
||||
m_ppi8255_0->out_pc_callback().set(FUNC(pmd85_state::pmd85_ppi_0_portc_w));
|
||||
I8255(config, m_ppi0, 0);
|
||||
m_ppi0->in_pa_callback().set(FUNC(pmd85_state::ppi0_porta_r));
|
||||
m_ppi0->in_pb_callback().set(FUNC(pmd85_state::ppi0_portb_r));
|
||||
m_ppi0->in_pc_callback().set(FUNC(pmd85_state::ppi0_portc_r));
|
||||
m_ppi0->out_pa_callback().set(FUNC(pmd85_state::ppi0_porta_w));
|
||||
m_ppi0->out_pb_callback().set(FUNC(pmd85_state::ppi0_portb_w));
|
||||
m_ppi0->out_pc_callback().set(FUNC(pmd85_state::ppi0_portc_w));
|
||||
|
||||
I8255(config, m_ppi8255_1, 0);
|
||||
m_ppi8255_1->in_pa_callback().set(FUNC(pmd85_state::pmd85_ppi_1_porta_r));
|
||||
m_ppi8255_1->in_pb_callback().set(FUNC(pmd85_state::pmd85_ppi_1_portb_r));
|
||||
m_ppi8255_1->in_pc_callback().set(FUNC(pmd85_state::pmd85_ppi_1_portc_r));
|
||||
m_ppi8255_1->out_pa_callback().set(FUNC(pmd85_state::pmd85_ppi_1_porta_w));
|
||||
m_ppi8255_1->out_pb_callback().set(FUNC(pmd85_state::pmd85_ppi_1_portb_w));
|
||||
m_ppi8255_1->out_pc_callback().set(FUNC(pmd85_state::pmd85_ppi_1_portc_w));
|
||||
I8255(config, m_ppi1, 0);
|
||||
m_ppi1->in_pa_callback().set(FUNC(pmd85_state::ppi1_porta_r));
|
||||
m_ppi1->in_pb_callback().set(FUNC(pmd85_state::ppi1_portb_r));
|
||||
m_ppi1->in_pc_callback().set(FUNC(pmd85_state::ppi1_portc_r));
|
||||
m_ppi1->out_pa_callback().set(FUNC(pmd85_state::ppi1_porta_w));
|
||||
m_ppi1->out_pb_callback().set(FUNC(pmd85_state::ppi1_portb_w));
|
||||
m_ppi1->out_pc_callback().set(FUNC(pmd85_state::ppi1_portc_w));
|
||||
|
||||
I8255(config, m_ppi8255_2, 0);
|
||||
m_ppi8255_2->in_pa_callback().set(FUNC(pmd85_state::pmd85_ppi_2_porta_r));
|
||||
m_ppi8255_2->in_pb_callback().set(FUNC(pmd85_state::pmd85_ppi_2_portb_r));
|
||||
m_ppi8255_2->in_pc_callback().set(FUNC(pmd85_state::pmd85_ppi_2_portc_r));
|
||||
m_ppi8255_2->out_pa_callback().set(FUNC(pmd85_state::pmd85_ppi_2_porta_w));
|
||||
m_ppi8255_2->out_pb_callback().set(FUNC(pmd85_state::pmd85_ppi_2_portb_w));
|
||||
m_ppi8255_2->out_pc_callback().set(FUNC(pmd85_state::pmd85_ppi_2_portc_w));
|
||||
I8255(config, m_ppi2, 0);
|
||||
m_ppi2->in_pa_callback().set(FUNC(pmd85_state::ppi2_porta_r));
|
||||
m_ppi2->in_pb_callback().set(FUNC(pmd85_state::ppi2_portb_r));
|
||||
m_ppi2->in_pc_callback().set(FUNC(pmd85_state::ppi2_portc_r));
|
||||
m_ppi2->out_pa_callback().set(FUNC(pmd85_state::ppi2_porta_w));
|
||||
m_ppi2->out_pb_callback().set(FUNC(pmd85_state::ppi2_portb_w));
|
||||
m_ppi2->out_pc_callback().set(FUNC(pmd85_state::ppi2_portc_w));
|
||||
|
||||
I8255(config, m_ppi8255_3, 0);
|
||||
m_ppi8255_3->in_pa_callback().set(FUNC(pmd85_state::pmd85_ppi_3_porta_r));
|
||||
m_ppi8255_3->in_pb_callback().set(FUNC(pmd85_state::pmd85_ppi_3_portb_r));
|
||||
m_ppi8255_3->in_pc_callback().set(FUNC(pmd85_state::pmd85_ppi_3_portc_r));
|
||||
m_ppi8255_3->out_pa_callback().set(FUNC(pmd85_state::pmd85_ppi_3_porta_w));
|
||||
m_ppi8255_3->out_pb_callback().set(FUNC(pmd85_state::pmd85_ppi_3_portb_w));
|
||||
m_ppi8255_3->out_pc_callback().set(FUNC(pmd85_state::pmd85_ppi_3_portc_w));
|
||||
I8255(config, m_ppi3, 0);
|
||||
m_ppi3->in_pa_callback().set(FUNC(pmd85_state::ppi3_porta_r));
|
||||
m_ppi3->in_pb_callback().set(FUNC(pmd85_state::ppi3_portb_r));
|
||||
m_ppi3->in_pc_callback().set(FUNC(pmd85_state::ppi3_portc_r));
|
||||
m_ppi3->out_pa_callback().set(FUNC(pmd85_state::ppi3_porta_w));
|
||||
m_ppi3->out_pb_callback().set(FUNC(pmd85_state::ppi3_portb_w));
|
||||
m_ppi3->out_pc_callback().set(FUNC(pmd85_state::ppi3_portc_w));
|
||||
}
|
||||
|
||||
void pmd85_state::pmd852a(machine_config &config)
|
||||
@ -744,44 +745,44 @@ void pmd85_state::alfa(machine_config &config)
|
||||
pmd85(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &pmd85_state::alfa_mem);
|
||||
|
||||
I8255(config, m_ppi8255_0, 0);
|
||||
m_ppi8255_0->in_pa_callback().set(FUNC(pmd85_state::pmd85_ppi_0_porta_r));
|
||||
m_ppi8255_0->in_pb_callback().set(FUNC(pmd85_state::pmd85_ppi_0_portb_r));
|
||||
m_ppi8255_0->in_pc_callback().set(FUNC(pmd85_state::pmd85_ppi_0_portc_r));
|
||||
m_ppi8255_0->out_pa_callback().set(FUNC(pmd85_state::pmd85_ppi_0_porta_w));
|
||||
m_ppi8255_0->out_pb_callback().set(FUNC(pmd85_state::pmd85_ppi_0_portb_w));
|
||||
m_ppi8255_0->out_pc_callback().set(FUNC(pmd85_state::pmd85_ppi_0_portc_w));
|
||||
I8255(config, m_ppi0, 0);
|
||||
m_ppi0->in_pa_callback().set(FUNC(pmd85_state::ppi0_porta_r));
|
||||
m_ppi0->in_pb_callback().set(FUNC(pmd85_state::ppi0_portb_r));
|
||||
m_ppi0->in_pc_callback().set(FUNC(pmd85_state::ppi0_portc_r));
|
||||
m_ppi0->out_pa_callback().set(FUNC(pmd85_state::ppi0_porta_w));
|
||||
m_ppi0->out_pb_callback().set(FUNC(pmd85_state::ppi0_portb_w));
|
||||
m_ppi0->out_pc_callback().set(FUNC(pmd85_state::ppi0_portc_w));
|
||||
|
||||
I8255(config, m_ppi8255_1, 0);
|
||||
m_ppi8255_1->in_pa_callback().set(FUNC(pmd85_state::pmd85_ppi_1_porta_r));
|
||||
m_ppi8255_1->in_pb_callback().set(FUNC(pmd85_state::pmd85_ppi_1_portb_r));
|
||||
m_ppi8255_1->in_pc_callback().set(FUNC(pmd85_state::pmd85_ppi_1_portc_r));
|
||||
m_ppi8255_1->out_pa_callback().set(FUNC(pmd85_state::pmd85_ppi_1_porta_w));
|
||||
m_ppi8255_1->out_pb_callback().set(FUNC(pmd85_state::pmd85_ppi_1_portb_w));
|
||||
m_ppi8255_1->out_pc_callback().set(FUNC(pmd85_state::pmd85_ppi_1_portc_w));
|
||||
I8255(config, m_ppi1, 0);
|
||||
m_ppi1->in_pa_callback().set(FUNC(pmd85_state::ppi1_porta_r));
|
||||
m_ppi1->in_pb_callback().set(FUNC(pmd85_state::ppi1_portb_r));
|
||||
m_ppi1->in_pc_callback().set(FUNC(pmd85_state::ppi1_portc_r));
|
||||
m_ppi1->out_pa_callback().set(FUNC(pmd85_state::ppi1_porta_w));
|
||||
m_ppi1->out_pb_callback().set(FUNC(pmd85_state::ppi1_portb_w));
|
||||
m_ppi1->out_pc_callback().set(FUNC(pmd85_state::ppi1_portc_w));
|
||||
|
||||
I8255(config, m_ppi8255_2, 0);
|
||||
m_ppi8255_2->in_pa_callback().set(FUNC(pmd85_state::pmd85_ppi_2_porta_r));
|
||||
m_ppi8255_2->in_pb_callback().set(FUNC(pmd85_state::pmd85_ppi_2_portb_r));
|
||||
m_ppi8255_2->in_pc_callback().set(FUNC(pmd85_state::pmd85_ppi_2_portc_r));
|
||||
m_ppi8255_2->out_pa_callback().set(FUNC(pmd85_state::pmd85_ppi_2_porta_w));
|
||||
m_ppi8255_2->out_pb_callback().set(FUNC(pmd85_state::pmd85_ppi_2_portb_w));
|
||||
m_ppi8255_2->out_pc_callback().set(FUNC(pmd85_state::pmd85_ppi_2_portc_w));
|
||||
I8255(config, m_ppi2, 0);
|
||||
m_ppi2->in_pa_callback().set(FUNC(pmd85_state::ppi2_porta_r));
|
||||
m_ppi2->in_pb_callback().set(FUNC(pmd85_state::ppi2_portb_r));
|
||||
m_ppi2->in_pc_callback().set(FUNC(pmd85_state::ppi2_portc_r));
|
||||
m_ppi2->out_pa_callback().set(FUNC(pmd85_state::ppi2_porta_w));
|
||||
m_ppi2->out_pb_callback().set(FUNC(pmd85_state::ppi2_portb_w));
|
||||
m_ppi2->out_pc_callback().set(FUNC(pmd85_state::ppi2_portc_w));
|
||||
}
|
||||
|
||||
void pmd85_state::mato(machine_config &config)
|
||||
{
|
||||
pmd85(config, false); /* no uart */
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &pmd85_state::mato_mem);
|
||||
m_maincpu->set_addrmap(AS_IO, &pmd85_state::mato_io_map);
|
||||
m_maincpu->set_addrmap(AS_IO, &pmd85_state::mato_io);
|
||||
|
||||
I8255(config, m_ppi8255_0, 0);
|
||||
m_ppi8255_0->in_pa_callback().set(FUNC(pmd85_state::pmd85_ppi_0_porta_r));
|
||||
m_ppi8255_0->out_pa_callback().set(FUNC(pmd85_state::pmd85_ppi_0_porta_w));
|
||||
m_ppi8255_0->in_pb_callback().set(FUNC(pmd85_state::mato_ppi_0_portb_r));
|
||||
m_ppi8255_0->out_pb_callback().set(FUNC(pmd85_state::pmd85_ppi_0_portb_w));
|
||||
m_ppi8255_0->in_pc_callback().set(FUNC(pmd85_state::mato_ppi_0_portc_r));
|
||||
m_ppi8255_0->out_pc_callback().set(FUNC(pmd85_state::mato_ppi_0_portc_w));
|
||||
I8255(config, m_ppi0, 0);
|
||||
m_ppi0->in_pa_callback().set(FUNC(pmd85_state::ppi0_porta_r));
|
||||
m_ppi0->out_pa_callback().set(FUNC(pmd85_state::ppi0_porta_w));
|
||||
m_ppi0->in_pb_callback().set(FUNC(pmd85_state::mato_ppi0_portb_r));
|
||||
m_ppi0->out_pb_callback().set(FUNC(pmd85_state::ppi0_portb_w));
|
||||
m_ppi0->in_pc_callback().set(FUNC(pmd85_state::mato_ppi0_portc_r));
|
||||
m_ppi0->out_pc_callback().set(FUNC(pmd85_state::mato_ppi0_portc_w));
|
||||
}
|
||||
|
||||
void pmd85_state::c2717(machine_config &config)
|
||||
@ -792,82 +793,87 @@ void pmd85_state::c2717(machine_config &config)
|
||||
|
||||
|
||||
ROM_START(pmd851)
|
||||
ROM_REGION(0x11000,"maincpu",0)
|
||||
ROM_LOAD("pmd85-1.bin", 0x10000, 0x1000, CRC(ef50b416) SHA1(afa3ec0d03228adc5287a4cba905ce7ad0497dff))
|
||||
ROM_REGION(0x1000,"maincpu",0)
|
||||
ROM_LOAD("pmd85-1.bin", 0x0000, 0x1000, CRC(ef50b416) SHA1(afa3ec0d03228adc5287a4cba905ce7ad0497dff))
|
||||
|
||||
ROM_REGION(0x2400,"user1",0)
|
||||
ROM_LOAD_OPTIONAL("pmd85-1.bas", 0x0000, 0x2400, CRC(4fc37d45) SHA1(3bd0f92f37a3f2ee539916dc75508bda37433a72))
|
||||
ROM_LOAD("pmd85-1.bas", 0x0000, 0x2400, CRC(4fc37d45) SHA1(3bd0f92f37a3f2ee539916dc75508bda37433a72))
|
||||
ROM_END
|
||||
|
||||
ROM_START(pmd852)
|
||||
ROM_REGION(0x11000,"maincpu",0)
|
||||
ROM_LOAD("pmd85-2.bin", 0x10000, 0x1000, CRC(d4786f63) SHA1(6facdf37bb012714244b012a0c4bd715a956e42b))
|
||||
ROM_REGION(0x1000,"maincpu",0)
|
||||
ROM_LOAD("pmd85-2.bin", 0x0000, 0x1000, CRC(d4786f63) SHA1(6facdf37bb012714244b012a0c4bd715a956e42b))
|
||||
|
||||
ROM_REGION(0x2400,"user1",0)
|
||||
ROM_LOAD_OPTIONAL("pmd85-2.bas", 0x0000, 0x2400, CRC(fc4a3ebf) SHA1(3bfc0e9a5cd5187da573b5d539d7246358125a88))
|
||||
ROM_LOAD("pmd85-2.bas", 0x0000, 0x2400, CRC(fc4a3ebf) SHA1(3bfc0e9a5cd5187da573b5d539d7246358125a88))
|
||||
ROM_END
|
||||
|
||||
ROM_START(pmd852a)
|
||||
ROM_REGION(0x11000,"maincpu",0)
|
||||
ROM_LOAD("pmd85-2a.bin", 0x10000, 0x1000, CRC(5a9a961b) SHA1(7363341596367d08b9a98767c6585ce18dfd03af))
|
||||
ROM_REGION(0x1000,"maincpu",0)
|
||||
ROM_LOAD("pmd85-2a.bin", 0x0000, 0x1000, CRC(5a9a961b) SHA1(7363341596367d08b9a98767c6585ce18dfd03af))
|
||||
|
||||
ROM_REGION(0x2400,"user1",0)
|
||||
ROM_LOAD_OPTIONAL("pmd85-2a.bas", 0x0000, 0x2400, CRC(6ff379ad) SHA1(edcaf2420cac9771596ead5c86c41116b228eca3))
|
||||
ROM_LOAD("pmd85-2a.bas", 0x0000, 0x2400, CRC(6ff379ad) SHA1(edcaf2420cac9771596ead5c86c41116b228eca3))
|
||||
ROM_END
|
||||
|
||||
ROM_START(pmd852b)
|
||||
ROM_REGION(0x11000,"maincpu",0)
|
||||
ROM_LOAD("pmd85-2a.bin", 0x10000, 0x1000, CRC(5a9a961b) SHA1(7363341596367d08b9a98767c6585ce18dfd03af))
|
||||
ROM_REGION(0x1000,"maincpu",0)
|
||||
ROM_LOAD("pmd85-2a.bin", 0x0000, 0x1000, CRC(5a9a961b) SHA1(7363341596367d08b9a98767c6585ce18dfd03af))
|
||||
|
||||
ROM_REGION(0x2400,"user1",0)
|
||||
ROM_LOAD_OPTIONAL("pmd85-2a.bas", 0x0000, 0x2400, CRC(6ff379ad) SHA1(edcaf2420cac9771596ead5c86c41116b228eca3))
|
||||
ROM_LOAD("pmd85-2a.bas", 0x0000, 0x2400, CRC(6ff379ad) SHA1(edcaf2420cac9771596ead5c86c41116b228eca3))
|
||||
ROM_END
|
||||
|
||||
ROM_START(pmd853)
|
||||
ROM_REGION(0x12000,"maincpu",0)
|
||||
ROM_LOAD("pmd85-3.bin", 0x10000, 0x2000, CRC(83e22c47) SHA1(5f131e27ae3ec8907adbe5cd228c67d131066084))
|
||||
ROM_REGION(0x2000,"maincpu",0)
|
||||
ROM_LOAD("pmd85-3.bin", 0x0000, 0x2000, CRC(83e22c47) SHA1(5f131e27ae3ec8907adbe5cd228c67d131066084))
|
||||
|
||||
ROM_REGION(0x2800,"user1",0)
|
||||
ROM_LOAD_OPTIONAL("pmd85-3.bas", 0x0000, 0x2800, CRC(1e30e91d) SHA1(d086040abf4c0a7e5da8cf4db7d1668a1d9309a4))
|
||||
ROM_LOAD("pmd85-3.bas", 0x0000, 0x2800, CRC(1e30e91d) SHA1(d086040abf4c0a7e5da8cf4db7d1668a1d9309a4))
|
||||
ROM_END
|
||||
|
||||
ROM_START(alfa)
|
||||
ROM_REGION(0x13400,"maincpu",0)
|
||||
ROM_LOAD("alfa.bin", 0x10000, 0x1000, CRC(e425eedb) SHA1(db93b5de1e16b5ae71be08feb083a2ac15759495))
|
||||
ROM_LOAD("alfa.bas", 0x11000, 0x2400, CRC(9a73bfd2) SHA1(74314d989846f64e715f64deb84cb177fa62f4a9))
|
||||
ROM_REGION(0x3400,"maincpu",0)
|
||||
ROM_LOAD("alfa.bin", 0x0000, 0x1000, CRC(e425eedb) SHA1(db93b5de1e16b5ae71be08feb083a2ac15759495))
|
||||
ROM_LOAD("alfa.bas", 0x1000, 0x2400, CRC(9a73bfd2) SHA1(74314d989846f64e715f64deb84cb177fa62f4a9))
|
||||
ROM_END
|
||||
|
||||
ROM_START(mato)
|
||||
ROM_REGION(0x14000,"maincpu",0)
|
||||
ROM_REGION(0x4000,"maincpu",0)
|
||||
ROM_SYSTEM_BIOS(0, "default", "BASIC")
|
||||
ROMX_LOAD("mato.bin", 0x10000, 0x4000, CRC(574110a6) SHA1(4ff2cd4b07a1a700c55f92e5b381c04f758fb461), ROM_BIOS(0))
|
||||
ROMX_LOAD("mato.bin", 0x0000, 0x4000, CRC(574110a6) SHA1(4ff2cd4b07a1a700c55f92e5b381c04f758fb461), ROM_BIOS(0))
|
||||
ROM_SYSTEM_BIOS(1, "ru", "Russian")
|
||||
ROMX_LOAD("mato-ru.rom", 0x10000, 0x4000, CRC(44b68be4) SHA1(0d9ea9a9380e2af011a2f0b64c534dd0eb0a1fac), ROM_BIOS(1))
|
||||
ROMX_LOAD("mato-ru.rom", 0x0000, 0x4000, CRC(44b68be4) SHA1(0d9ea9a9380e2af011a2f0b64c534dd0eb0a1fac), ROM_BIOS(1))
|
||||
ROM_SYSTEM_BIOS(2, "lan", "BASIC LAN")
|
||||
ROMX_LOAD("mato-lan.rom", 0x10000, 0x4000, CRC(422cddde) SHA1(2a3dacf8e3e7637109c9d267f589a00881e9a5f4), ROM_BIOS(2))
|
||||
ROMX_LOAD("mato-lan.rom", 0x0000, 0x4000, CRC(422cddde) SHA1(2a3dacf8e3e7637109c9d267f589a00881e9a5f4), ROM_BIOS(2))
|
||||
ROM_SYSTEM_BIOS(3, "games", "Games v1")
|
||||
ROMX_LOAD("matoh.bin", 0x10000, 0x4000, CRC(ca25880d) SHA1(38ce0b6a26d48a09fdf96863c3eaf3705aca2590), ROM_BIOS(3))
|
||||
ROMX_LOAD("matoh.bin", 0x0000, 0x4000, CRC(ca25880d) SHA1(38ce0b6a26d48a09fdf96863c3eaf3705aca2590), ROM_BIOS(3))
|
||||
ROM_SYSTEM_BIOS(4, "gamesen", "Games v2 EN")
|
||||
ROMX_LOAD("matogmen.rom", 0x10000, 0x4000, CRC(47e039c8) SHA1(6cc73a6b58921b33691d2751dee28428456eb222), ROM_BIOS(4))
|
||||
ROMX_LOAD("matogmen.rom", 0x0000, 0x4000, CRC(47e039c8) SHA1(6cc73a6b58921b33691d2751dee28428456eb222), ROM_BIOS(4))
|
||||
ROM_SYSTEM_BIOS(5, "gamessk", "Games v2 SK")
|
||||
ROMX_LOAD("matogmsk.rom", 0x10000, 0x4000, CRC(d0c9b1e7) SHA1(9e7289d971a957bf161c317e5fa76db3289ee23c), ROM_BIOS(5))
|
||||
ROMX_LOAD("matogmsk.rom", 0x0000, 0x4000, CRC(d0c9b1e7) SHA1(9e7289d971a957bf161c317e5fa76db3289ee23c), ROM_BIOS(5))
|
||||
ROM_SYSTEM_BIOS(6, "games3", "Games v3")
|
||||
ROMX_LOAD("matogm3.rom", 0x10000, 0x4000, CRC(9352f2c1) SHA1(b3e45c56d2800c69a0bb02febda6fa715f1afbc3), ROM_BIOS(6))
|
||||
ROMX_LOAD("matogm3.rom", 0x0000, 0x4000, CRC(9352f2c1) SHA1(b3e45c56d2800c69a0bb02febda6fa715f1afbc3), ROM_BIOS(6))
|
||||
ROM_END
|
||||
|
||||
ROM_START(c2717)
|
||||
ROM_REGION(0x14000,"maincpu",0)
|
||||
ROM_LOAD("c2717.rom", 0x10000, 0x4000, CRC(da1703b1) SHA1(9fb93e6cae8b551064c7175bf3b4e3113429ce73))
|
||||
ROM_REGION(0x4000,"maincpu",0)
|
||||
ROM_LOAD("c2717.rom", 0x0000, 0x4000, CRC(da1703b1) SHA1(9fb93e6cae8b551064c7175bf3b4e3113429ce73))
|
||||
ROM_END
|
||||
|
||||
ROM_START(c2717pmd)
|
||||
ROM_REGION(0x14000,"maincpu",0)
|
||||
ROM_LOAD( "c2717-pmd32.rom", 0x10000, 0x4000, CRC(cbdd323c) SHA1(ee9fea11be8bd4f945c583b0ae5684269906d0ce))
|
||||
ROM_REGION(0x4000,"maincpu",0)
|
||||
ROM_LOAD( "c2717-pmd32.rom", 0x00000, 0x4000, CRC(cbdd323c) SHA1(ee9fea11be8bd4f945c583b0ae5684269906d0ce))
|
||||
ROM_END
|
||||
|
||||
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
|
||||
COMP( 1985, pmd851, 0, 0, pmd851, pmd85, pmd85_state, init_pmd851, "Tesla", "PMD-85.1", 0 )
|
||||
COMP( 1985, pmd852, pmd851, 0, pmd851, pmd85, pmd85_state, init_pmd852, "Tesla", "PMD-85.2", 0 )
|
||||
COMP( 1985, pmd852a, pmd851, 0, pmd852a, pmd85, pmd85_state, init_pmd852a, "Tesla", "PMD-85.2A", 0 )
|
||||
COMP( 1985, pmd852b, pmd851, 0, pmd852a, pmd85, pmd85_state, init_pmd852a, "Tesla", "PMD-85.2B", 0 )
|
||||
COMP( 1988, pmd853, pmd851, 0, pmd853, pmd85, pmd85_state, init_pmd853, "Tesla", "PMD-85.3", 0 )
|
||||
COMP( 1986, alfa, pmd851, 0, alfa, alfa, pmd85_state, init_alfa, "Didaktik Skalica", "Didaktik Alfa", 0 )
|
||||
COMP( 1985, mato, pmd851, 0, mato, mato, pmd85_state, init_mato, "Statny", "Mato", 0 )
|
||||
COMP( 1989, c2717, pmd851, 0, c2717, pmd85, pmd85_state, init_c2717, "Zbrojovka Brno", "Consul 2717", 0 )
|
||||
COMP( 1989, c2717pmd, pmd851, 0, c2717, pmd85, pmd85_state, init_c2717, "Zbrojovka Brno", "Consul 2717 (with PMD-32)", MACHINE_NOT_WORKING )
|
||||
COMP( 1985, pmd851, 0, 0, pmd851, alfa, pmd85_state, init_pmd851, "Tesla", "PMD-85.1", MACHINE_SUPPORTS_SAVE )
|
||||
COMP( 1985, pmd852, pmd851, 0, pmd851, pmd85, pmd85_state, init_pmd852, "Tesla", "PMD-85.2", MACHINE_SUPPORTS_SAVE )
|
||||
COMP( 1985, pmd852a, pmd851, 0, pmd852a, pmd85, pmd85_state, init_pmd852a, "Tesla", "PMD-85.2A", MACHINE_SUPPORTS_SAVE )
|
||||
COMP( 1985, pmd852b, pmd851, 0, pmd852a, pmd85, pmd85_state, init_pmd852a, "Tesla", "PMD-85.2B", MACHINE_SUPPORTS_SAVE )
|
||||
COMP( 1988, pmd853, pmd851, 0, pmd853, pmd85, pmd85_state, init_pmd853, "Tesla", "PMD-85.3", MACHINE_SUPPORTS_SAVE )
|
||||
COMP( 1986, alfa, pmd851, 0, alfa, alfa, pmd85_state, init_alfa, "Didaktik Skalica", "Didaktik Alfa", MACHINE_SUPPORTS_SAVE )
|
||||
COMP( 1985, mato, pmd851, 0, mato, mato, pmd85_state, init_mato, "Statny", "Mato", MACHINE_SUPPORTS_SAVE )
|
||||
COMP( 1989, c2717, pmd851, 0, c2717, pmd85, pmd85_state, init_c2717, "Zbrojovka Brno", "Consul 2717", MACHINE_SUPPORTS_SAVE )
|
||||
COMP( 1989, c2717pmd, pmd851, 0, c2717, pmd85, pmd85_state, init_c2717, "Zbrojovka Brno", "Consul 2717 (with PMD-32)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "machine/pit8253.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "imagedev/cassette.h"
|
||||
#include "sound/spkrdev.h"
|
||||
#include "machine/ram.h"
|
||||
#include "emupal.h"
|
||||
|
||||
@ -21,37 +22,24 @@
|
||||
class pmd85_state : public driver_device
|
||||
{
|
||||
public:
|
||||
pmd85_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_cassette(*this, "cassette"),
|
||||
m_pit8253(*this, "pit8253"),
|
||||
m_uart(*this, "uart"),
|
||||
m_ppi8255_0(*this, "ppi8255_0"),
|
||||
m_ppi8255_1(*this, "ppi8255_1"),
|
||||
m_ppi8255_2(*this, "ppi8255_2"),
|
||||
m_ppi8255_3(*this, "ppi8255_3"),
|
||||
m_region_maincpu(*this, "maincpu"),
|
||||
m_bank1(*this, "bank1"),
|
||||
m_bank2(*this, "bank2"),
|
||||
m_bank3(*this, "bank3"),
|
||||
m_bank4(*this, "bank4"),
|
||||
m_bank5(*this, "bank5"),
|
||||
m_bank6(*this, "bank6"),
|
||||
m_bank7(*this, "bank7"),
|
||||
m_bank8(*this, "bank8"),
|
||||
m_bank9(*this, "bank9"),
|
||||
m_bank10(*this, "bank10"),
|
||||
m_bank11(*this, "bank11"),
|
||||
m_bank12(*this, "bank12"),
|
||||
m_bank13(*this, "bank13"),
|
||||
m_bank14(*this, "bank14"),
|
||||
m_bank15(*this, "bank15"),
|
||||
m_bank16(*this, "bank16"),
|
||||
m_io_dsw0(*this, "DSW0"),
|
||||
m_palette(*this, "palette"),
|
||||
m_leds(*this, "led%u", 0U)
|
||||
pmd85_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_rom(*this, "maincpu")
|
||||
, m_ram(*this, RAM_TAG)
|
||||
, m_cassette(*this, "cassette")
|
||||
, m_speaker(*this, "speaker")
|
||||
, m_pit(*this, "pit")
|
||||
, m_uart(*this, "uart")
|
||||
, m_ppi0(*this, "ppi0")
|
||||
, m_ppi1(*this, "ppi1")
|
||||
, m_ppi2(*this, "ppi2")
|
||||
, m_ppi3(*this, "ppi3")
|
||||
, m_bank(*this, "bank%d", 0U)
|
||||
, m_io_dsw0(*this, "DSW0")
|
||||
, m_palette(*this, "palette")
|
||||
, m_io_keyboard(*this, "KEY%u", 0U)
|
||||
, m_leds(*this, "led%u", 0U)
|
||||
{ }
|
||||
|
||||
void pmd85(machine_config &config, bool with_uart = true);
|
||||
@ -78,6 +66,7 @@ private:
|
||||
TIMER_CASSETTE
|
||||
};
|
||||
|
||||
bool m_txd, m_rts;
|
||||
uint8_t m_rom_module_present;
|
||||
uint8_t m_ppi_port_outputs[4][3];
|
||||
uint8_t m_startup_mem_map;
|
||||
@ -88,83 +77,52 @@ private:
|
||||
uint8_t m_model;
|
||||
emu_timer * m_cassette_timer;
|
||||
void (pmd85_state::*update_memory)();
|
||||
uint8_t pmd85_io_r(offs_t offset);
|
||||
void pmd85_io_w(offs_t offset, uint8_t data);
|
||||
uint8_t io_r(offs_t offset);
|
||||
void io_w(offs_t offset, uint8_t data);
|
||||
uint8_t mato_io_r(offs_t offset);
|
||||
void mato_io_w(offs_t offset, uint8_t data);
|
||||
|
||||
virtual void machine_reset() override;
|
||||
uint32_t screen_update_pmd85(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(pmd85_cassette_timer_callback);
|
||||
uint8_t pmd85_ppi_0_porta_r();
|
||||
uint8_t pmd85_ppi_0_portb_r();
|
||||
uint8_t pmd85_ppi_0_portc_r();
|
||||
void pmd85_ppi_0_porta_w(uint8_t data);
|
||||
void pmd85_ppi_0_portb_w(uint8_t data);
|
||||
void pmd85_ppi_0_portc_w(uint8_t data);
|
||||
uint8_t mato_ppi_0_portb_r();
|
||||
uint8_t mato_ppi_0_portc_r();
|
||||
void mato_ppi_0_portc_w(uint8_t data);
|
||||
uint8_t pmd85_ppi_1_porta_r();
|
||||
uint8_t pmd85_ppi_1_portb_r();
|
||||
uint8_t pmd85_ppi_1_portc_r();
|
||||
void pmd85_ppi_1_porta_w(uint8_t data);
|
||||
void pmd85_ppi_1_portb_w(uint8_t data);
|
||||
void pmd85_ppi_1_portc_w(uint8_t data);
|
||||
uint8_t pmd85_ppi_2_porta_r();
|
||||
uint8_t pmd85_ppi_2_portb_r();
|
||||
uint8_t pmd85_ppi_2_portc_r();
|
||||
void pmd85_ppi_2_porta_w(uint8_t data);
|
||||
void pmd85_ppi_2_portb_w(uint8_t data);
|
||||
void pmd85_ppi_2_portc_w(uint8_t data);
|
||||
uint8_t pmd85_ppi_3_porta_r();
|
||||
uint8_t pmd85_ppi_3_portb_r();
|
||||
uint8_t pmd85_ppi_3_portc_r();
|
||||
void pmd85_ppi_3_porta_w(uint8_t data);
|
||||
void pmd85_ppi_3_portb_w(uint8_t data);
|
||||
void pmd85_ppi_3_portc_w(uint8_t data);
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(cassette_timer_callback);
|
||||
uint8_t ppi0_porta_r();
|
||||
uint8_t ppi0_portb_r();
|
||||
uint8_t ppi0_portc_r();
|
||||
void ppi0_porta_w(uint8_t data);
|
||||
void ppi0_portb_w(uint8_t data);
|
||||
void ppi0_portc_w(uint8_t data);
|
||||
uint8_t mato_ppi0_portb_r();
|
||||
uint8_t mato_ppi0_portc_r();
|
||||
void mato_ppi0_portc_w(uint8_t data);
|
||||
uint8_t ppi1_porta_r();
|
||||
uint8_t ppi1_portb_r();
|
||||
uint8_t ppi1_portc_r();
|
||||
void ppi1_porta_w(uint8_t data);
|
||||
void ppi1_portb_w(uint8_t data);
|
||||
void ppi1_portc_w(uint8_t data);
|
||||
uint8_t ppi2_porta_r();
|
||||
uint8_t ppi2_portb_r();
|
||||
uint8_t ppi2_portc_r();
|
||||
void ppi2_porta_w(uint8_t data);
|
||||
void ppi2_portb_w(uint8_t data);
|
||||
void ppi2_portc_w(uint8_t data);
|
||||
uint8_t ppi3_porta_r();
|
||||
uint8_t ppi3_portb_r();
|
||||
uint8_t ppi3_portc_r();
|
||||
void ppi3_porta_w(uint8_t data);
|
||||
void ppi3_portb_w(uint8_t data);
|
||||
void ppi3_portc_w(uint8_t data);
|
||||
|
||||
void alfa_mem(address_map &map);
|
||||
void c2717_mem(address_map &map);
|
||||
void mato_io_map(address_map &map);
|
||||
void mato_io(address_map &map);
|
||||
void mato_mem(address_map &map);
|
||||
void pmd852a_mem(address_map &map);
|
||||
void pmd853_mem(address_map &map);
|
||||
void pmd85_io_map(address_map &map);
|
||||
void pmd85_io(address_map &map);
|
||||
void pmd85_mem(address_map &map);
|
||||
|
||||
virtual void machine_start() override { m_leds.resolve(); }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<ram_device> m_ram;
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
required_device<pit8253_device> m_pit8253;
|
||||
optional_device<i8251_device> m_uart;
|
||||
optional_device<i8255_device> m_ppi8255_0;
|
||||
optional_device<i8255_device> m_ppi8255_1;
|
||||
optional_device<i8255_device> m_ppi8255_2;
|
||||
optional_device<i8255_device> m_ppi8255_3;
|
||||
required_memory_region m_region_maincpu;
|
||||
required_memory_bank m_bank1;
|
||||
required_memory_bank m_bank2;
|
||||
required_memory_bank m_bank3;
|
||||
required_memory_bank m_bank4;
|
||||
optional_memory_bank m_bank5;
|
||||
optional_memory_bank m_bank6;
|
||||
optional_memory_bank m_bank7;
|
||||
optional_memory_bank m_bank8;
|
||||
optional_memory_bank m_bank9;
|
||||
optional_memory_bank m_bank10;
|
||||
optional_memory_bank m_bank11;
|
||||
optional_memory_bank m_bank12;
|
||||
optional_memory_bank m_bank13;
|
||||
optional_memory_bank m_bank14;
|
||||
optional_memory_bank m_bank15;
|
||||
optional_memory_bank m_bank16;
|
||||
optional_ioport m_io_dsw0;
|
||||
ioport_port *m_io_port[16];
|
||||
required_device<palette_device> m_palette;
|
||||
output_finder<3> m_leds;
|
||||
virtual void machine_start() override;
|
||||
|
||||
void pmd851_update_memory();
|
||||
void pmd852a_update_memory();
|
||||
@ -172,10 +130,25 @@ private:
|
||||
void alfa_update_memory();
|
||||
void mato_update_memory();
|
||||
void c2717_update_memory();
|
||||
void pmd85_common_driver_init();
|
||||
void common_driver_init();
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
|
||||
bool m_txd, m_rts;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_region_ptr<u8> m_rom;
|
||||
required_device<ram_device> m_ram;
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
required_device<pit8253_device> m_pit;
|
||||
optional_device<i8251_device> m_uart;
|
||||
optional_device<i8255_device> m_ppi0;
|
||||
optional_device<i8255_device> m_ppi1;
|
||||
optional_device<i8255_device> m_ppi2;
|
||||
optional_device<i8255_device> m_ppi3;
|
||||
optional_memory_bank_array<17> m_bank;
|
||||
optional_ioport m_io_dsw0;
|
||||
required_device<palette_device> m_palette;
|
||||
optional_ioport_array<16> m_io_keyboard;
|
||||
output_finder<3> m_leds;
|
||||
};
|
||||
|
||||
|
||||
|
@ -12,9 +12,8 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/i8085/i8085.h"
|
||||
#include "includes/pmd85.h"
|
||||
#include "machine/pit8253.h"
|
||||
|
||||
|
||||
|
||||
enum {PMD85_LED_1 = 0, PMD85_LED_2, PMD85_LED_3};
|
||||
@ -29,8 +28,6 @@ void pmd85_state::pmd851_update_memory()
|
||||
|
||||
if (m_startup_mem_map)
|
||||
{
|
||||
uint8_t *mem = m_region_maincpu->base();
|
||||
|
||||
space.unmap_write(0x0000, 0x0fff);
|
||||
space.nop_write(0x1000, 0x1fff);
|
||||
space.unmap_write(0x2000, 0x2fff);
|
||||
@ -39,13 +36,13 @@ void pmd85_state::pmd851_update_memory()
|
||||
space.nop_read(0x1000, 0x1fff);
|
||||
space.nop_read(0x3000, 0x3fff);
|
||||
|
||||
m_bank1->set_base(mem + 0x010000);
|
||||
m_bank3->set_base(mem + 0x010000);
|
||||
m_bank5->set_base(ram + 0xc000);
|
||||
m_bank[1]->set_base(m_rom);
|
||||
m_bank[3]->set_base(m_rom);
|
||||
m_bank[5]->set_base(ram + 0xc000);
|
||||
|
||||
m_bank6->set_base(mem + 0x010000);
|
||||
m_bank7->set_base(mem + 0x010000);
|
||||
m_bank8->set_base(ram + 0xc000);
|
||||
m_bank[6]->set_base(m_rom);
|
||||
m_bank[7]->set_base(m_rom);
|
||||
m_bank[8]->set_base(ram + 0xc000);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -58,11 +55,11 @@ void pmd85_state::pmd851_update_memory()
|
||||
space.install_read_bank(0x1000, 0x1fff, "bank2");
|
||||
space.install_read_bank(0x3000, 0x3fff, "bank4");
|
||||
|
||||
m_bank1->set_base(ram);
|
||||
m_bank2->set_base(ram + 0x1000);
|
||||
m_bank3->set_base(ram + 0x2000);
|
||||
m_bank4->set_base(ram + 0x3000);
|
||||
m_bank5->set_base(ram + 0x4000);
|
||||
m_bank[1]->set_base(ram);
|
||||
m_bank[2]->set_base(ram + 0x1000);
|
||||
m_bank[3]->set_base(ram + 0x2000);
|
||||
m_bank[4]->set_base(ram + 0x3000);
|
||||
m_bank[5]->set_base(ram + 0x4000);
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,21 +70,19 @@ void pmd85_state::pmd852a_update_memory()
|
||||
|
||||
if (m_startup_mem_map)
|
||||
{
|
||||
uint8_t *mem = m_region_maincpu->base();
|
||||
|
||||
space.unmap_write(0x0000, 0x0fff);
|
||||
space.unmap_write(0x2000, 0x2fff);
|
||||
|
||||
m_bank1->set_base(mem + 0x010000);
|
||||
m_bank2->set_base(ram + 0x9000);
|
||||
m_bank3->set_base(mem + 0x010000);
|
||||
m_bank4->set_base(ram + 0xb000);
|
||||
m_bank5->set_base(ram + 0xc000);
|
||||
m_bank6->set_base(mem + 0x010000);
|
||||
m_bank7->set_base(ram + 0x9000);
|
||||
m_bank8->set_base(mem + 0x010000);
|
||||
m_bank9->set_base(ram + 0xb000);
|
||||
m_bank10->set_base(ram + 0xc000);
|
||||
m_bank[1]->set_base(m_rom);
|
||||
m_bank[2]->set_base(ram + 0x9000);
|
||||
m_bank[3]->set_base(m_rom);
|
||||
m_bank[4]->set_base(ram + 0xb000);
|
||||
m_bank[5]->set_base(ram + 0xc000);
|
||||
m_bank[6]->set_base(m_rom);
|
||||
m_bank[7]->set_base(ram + 0x9000);
|
||||
m_bank[8]->set_base(m_rom);
|
||||
m_bank[9]->set_base(ram + 0xb000);
|
||||
m_bank[10]->set_base(ram + 0xc000);
|
||||
|
||||
}
|
||||
else
|
||||
@ -95,48 +90,47 @@ void pmd85_state::pmd852a_update_memory()
|
||||
space.install_write_bank(0x0000, 0x0fff, "bank1");
|
||||
space.install_write_bank(0x2000, 0x2fff, "bank3");
|
||||
|
||||
m_bank1->set_base(ram);
|
||||
m_bank2->set_base(ram + 0x1000);
|
||||
m_bank3->set_base(ram + 0x2000);
|
||||
m_bank4->set_base(ram + 0x5000);
|
||||
m_bank5->set_base(ram + 0x4000);
|
||||
m_bank[1]->set_base(ram);
|
||||
m_bank[2]->set_base(ram + 0x1000);
|
||||
m_bank[3]->set_base(ram + 0x2000);
|
||||
m_bank[4]->set_base(ram + 0x5000);
|
||||
m_bank[5]->set_base(ram + 0x4000);
|
||||
}
|
||||
}
|
||||
|
||||
void pmd85_state::pmd853_update_memory()
|
||||
{
|
||||
uint8_t *mem = m_region_maincpu->base();
|
||||
uint8_t *ram = m_ram->pointer();
|
||||
|
||||
if (m_startup_mem_map)
|
||||
{
|
||||
m_bank1->set_base(mem + 0x010000);
|
||||
m_bank2->set_base(mem + 0x010000);
|
||||
m_bank3->set_base(mem + 0x010000);
|
||||
m_bank4->set_base(mem + 0x010000);
|
||||
m_bank5->set_base(mem + 0x010000);
|
||||
m_bank6->set_base(mem + 0x010000);
|
||||
m_bank7->set_base(mem + 0x010000);
|
||||
m_bank8->set_base(mem + 0x010000);
|
||||
m_bank9->set_base(ram);
|
||||
m_bank10->set_base(ram + 0x2000);
|
||||
m_bank11->set_base(ram + 0x4000);
|
||||
m_bank12->set_base(ram + 0x6000);
|
||||
m_bank13->set_base(ram + 0x8000);
|
||||
m_bank14->set_base(ram + 0xa000);
|
||||
m_bank15->set_base(ram + 0xc000);
|
||||
m_bank16->set_base(ram + 0xe000);
|
||||
m_bank[1]->set_base(m_rom);
|
||||
m_bank[2]->set_base(m_rom);
|
||||
m_bank[3]->set_base(m_rom);
|
||||
m_bank[4]->set_base(m_rom);
|
||||
m_bank[5]->set_base(m_rom);
|
||||
m_bank[6]->set_base(m_rom);
|
||||
m_bank[7]->set_base(m_rom);
|
||||
m_bank[8]->set_base(m_rom);
|
||||
m_bank[9]->set_base(ram);
|
||||
m_bank[10]->set_base(ram + 0x2000);
|
||||
m_bank[11]->set_base(ram + 0x4000);
|
||||
m_bank[12]->set_base(ram + 0x6000);
|
||||
m_bank[13]->set_base(ram + 0x8000);
|
||||
m_bank[14]->set_base(ram + 0xa000);
|
||||
m_bank[15]->set_base(ram + 0xc000);
|
||||
m_bank[16]->set_base(ram + 0xe000);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bank1->set_base(ram);
|
||||
m_bank2->set_base(ram + 0x2000);
|
||||
m_bank3->set_base(ram + 0x4000);
|
||||
m_bank4->set_base(ram + 0x6000);
|
||||
m_bank5->set_base(ram + 0x8000);
|
||||
m_bank6->set_base(ram + 0xa000);
|
||||
m_bank7->set_base(ram + 0xc000);
|
||||
m_bank8->set_base(m_pmd853_memory_mapping ? mem + 0x010000 : ram + 0xe000);
|
||||
m_bank[1]->set_base(ram);
|
||||
m_bank[2]->set_base(ram + 0x2000);
|
||||
m_bank[3]->set_base(ram + 0x4000);
|
||||
m_bank[4]->set_base(ram + 0x6000);
|
||||
m_bank[5]->set_base(ram + 0x8000);
|
||||
m_bank[6]->set_base(ram + 0xa000);
|
||||
m_bank[7]->set_base(ram + 0xc000);
|
||||
m_bank[8]->set_base(m_pmd853_memory_mapping ? m_rom : ram + 0xe000);
|
||||
}
|
||||
}
|
||||
|
||||
@ -147,18 +141,16 @@ void pmd85_state::alfa_update_memory()
|
||||
|
||||
if (m_startup_mem_map)
|
||||
{
|
||||
uint8_t *mem = m_region_maincpu->base();
|
||||
|
||||
space.unmap_write(0x0000, 0x0fff);
|
||||
space.unmap_write(0x1000, 0x33ff);
|
||||
space.nop_write(0x3400, 0x3fff);
|
||||
|
||||
m_bank1->set_base(mem + 0x010000);
|
||||
m_bank2->set_base(mem + 0x011000);
|
||||
m_bank4->set_base(ram + 0xc000);
|
||||
m_bank5->set_base(mem + 0x010000);
|
||||
m_bank6->set_base(mem + 0x011000);
|
||||
m_bank7->set_base(ram + 0xc000);
|
||||
m_bank[1]->set_base(m_rom);
|
||||
m_bank[2]->set_base(m_rom + 0x1000);
|
||||
m_bank[4]->set_base(ram + 0xc000);
|
||||
m_bank[5]->set_base(m_rom);
|
||||
m_bank[6]->set_base(m_rom + 0x1000);
|
||||
m_bank[7]->set_base(ram + 0xc000);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -166,10 +158,10 @@ void pmd85_state::alfa_update_memory()
|
||||
space.install_write_bank(0x1000, 0x33ff, "bank2");
|
||||
space.install_write_bank(0x3400, 0x3fff, "bank3");
|
||||
|
||||
m_bank1->set_base(ram);
|
||||
m_bank2->set_base(ram + 0x1000);
|
||||
m_bank3->set_base(ram + 0x3400);
|
||||
m_bank4->set_base(ram + 0x4000);
|
||||
m_bank[1]->set_base(ram);
|
||||
m_bank[2]->set_base(ram + 0x1000);
|
||||
m_bank[3]->set_base(ram + 0x3400);
|
||||
m_bank[4]->set_base(ram + 0x4000);
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,44 +172,41 @@ void pmd85_state::mato_update_memory()
|
||||
|
||||
if (m_startup_mem_map)
|
||||
{
|
||||
uint8_t *mem = m_region_maincpu->base();
|
||||
|
||||
space.unmap_write(0x0000, 0x3fff);
|
||||
|
||||
m_bank1->set_base(mem + 0x010000);
|
||||
m_bank2->set_base(ram + 0xc000);
|
||||
m_bank3->set_base(mem + 0x010000);
|
||||
m_bank4->set_base(ram + 0xc000);
|
||||
m_bank[1]->set_base(m_rom);
|
||||
m_bank[2]->set_base(ram + 0xc000);
|
||||
m_bank[3]->set_base(m_rom);
|
||||
m_bank[4]->set_base(ram + 0xc000);
|
||||
}
|
||||
else
|
||||
{
|
||||
space.install_write_bank(0x0000, 0x3fff, "bank1");
|
||||
|
||||
m_bank1->set_base(ram);
|
||||
m_bank2->set_base(ram + 0x4000);
|
||||
m_bank[1]->set_base(ram);
|
||||
m_bank[2]->set_base(ram + 0x4000);
|
||||
}
|
||||
}
|
||||
|
||||
void pmd85_state::c2717_update_memory()
|
||||
{
|
||||
address_space& space = m_maincpu->space(AS_PROGRAM);
|
||||
uint8_t *mem = m_region_maincpu->base();
|
||||
uint8_t *ram = m_ram->pointer();
|
||||
|
||||
if (m_startup_mem_map)
|
||||
{
|
||||
space.unmap_write(0x0000, 0x3fff);
|
||||
|
||||
m_bank1->set_base(mem + 0x010000);
|
||||
m_bank2->set_base(ram + 0x4000);
|
||||
m_bank3->set_base(mem + 0x010000);
|
||||
m_bank4->set_base(ram + 0xc000);
|
||||
m_bank[1]->set_base(m_rom);
|
||||
m_bank[2]->set_base(ram + 0x4000);
|
||||
m_bank[3]->set_base(m_rom);
|
||||
m_bank[4]->set_base(ram + 0xc000);
|
||||
}
|
||||
else
|
||||
{
|
||||
space.install_write_bank(0x0000, 0x3fff, "bank1");
|
||||
m_bank1->set_base(ram);
|
||||
m_bank2->set_base(ram + 0x4000);
|
||||
m_bank[1]->set_base(ram);
|
||||
m_bank[2]->set_base(ram + 0x4000);
|
||||
}
|
||||
}
|
||||
|
||||
@ -229,36 +218,37 @@ void pmd85_state::c2717_update_memory()
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
uint8_t pmd85_state::pmd85_ppi_0_porta_r()
|
||||
uint8_t pmd85_state::ppi0_porta_r()
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
uint8_t pmd85_state::pmd85_ppi_0_portb_r()
|
||||
uint8_t pmd85_state::ppi0_portb_r()
|
||||
{
|
||||
return m_io_port[(m_ppi_port_outputs[0][0] & 0x0f)]->read() & m_io_port[15]->read();
|
||||
return m_io_keyboard[(m_ppi_port_outputs[0][0] & 0x0f)]->read() & m_io_keyboard[15]->read();
|
||||
}
|
||||
|
||||
uint8_t pmd85_state::pmd85_ppi_0_portc_r()
|
||||
uint8_t pmd85_state::ppi0_portc_r()
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
void pmd85_state::pmd85_ppi_0_porta_w(uint8_t data)
|
||||
void pmd85_state::ppi0_porta_w(uint8_t data)
|
||||
{
|
||||
m_ppi_port_outputs[0][0] = data;
|
||||
}
|
||||
|
||||
void pmd85_state::pmd85_ppi_0_portb_w(uint8_t data)
|
||||
void pmd85_state::ppi0_portb_w(uint8_t data)
|
||||
{
|
||||
m_ppi_port_outputs[0][1] = data;
|
||||
}
|
||||
|
||||
void pmd85_state::pmd85_ppi_0_portc_w(uint8_t data)
|
||||
void pmd85_state::ppi0_portc_w(uint8_t data)
|
||||
{
|
||||
m_ppi_port_outputs[0][2] = data;
|
||||
m_leds[PMD85_LED_2] = BIT(data, 3);
|
||||
m_leds[PMD85_LED_3] = BIT(data, 2);
|
||||
//m_leds[PMD85_LED_3] = BIT(data, 2);
|
||||
m_speaker->level_w(BIT(data, 2));
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
@ -269,31 +259,30 @@ void pmd85_state::pmd85_ppi_0_portc_w(uint8_t data)
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
uint8_t pmd85_state::mato_ppi_0_portb_r()
|
||||
uint8_t pmd85_state::mato_ppi0_portb_r()
|
||||
{
|
||||
int i;
|
||||
uint8_t data = 0xff;
|
||||
u8 i,data = 0xff;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
if (!BIT(m_ppi_port_outputs[0][0], i))
|
||||
data &= m_io_port[i]->read();
|
||||
}
|
||||
data &= m_io_keyboard[i]->read();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
uint8_t pmd85_state::mato_ppi_0_portc_r()
|
||||
uint8_t pmd85_state::mato_ppi0_portc_r()
|
||||
{
|
||||
u8 data = m_io_port[8]->read() & 0x7f;
|
||||
u8 data = m_io_keyboard[8]->read() & 0x7f;
|
||||
data |= (m_cassette->input() > 0.038) ? 0x80 : 0;
|
||||
return data;
|
||||
}
|
||||
|
||||
void pmd85_state::mato_ppi_0_portc_w(uint8_t data)
|
||||
void pmd85_state::mato_ppi0_portc_w(uint8_t data)
|
||||
{
|
||||
m_ppi_port_outputs[0][2] = data;
|
||||
m_leds[PMD85_LED_2] = BIT(data, 3);
|
||||
m_leds[PMD85_LED_3] = BIT(data, 2);
|
||||
m_speaker->level_w(BIT(data, 1));
|
||||
m_cassette->output(BIT(data, 0) ? 1 : -1);
|
||||
}
|
||||
|
||||
@ -305,32 +294,32 @@ void pmd85_state::mato_ppi_0_portc_w(uint8_t data)
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
uint8_t pmd85_state::pmd85_ppi_1_porta_r()
|
||||
uint8_t pmd85_state::ppi1_porta_r()
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
uint8_t pmd85_state::pmd85_ppi_1_portb_r()
|
||||
uint8_t pmd85_state::ppi1_portb_r()
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
uint8_t pmd85_state::pmd85_ppi_1_portc_r()
|
||||
uint8_t pmd85_state::ppi1_portc_r()
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
void pmd85_state::pmd85_ppi_1_porta_w(uint8_t data)
|
||||
void pmd85_state::ppi1_porta_w(uint8_t data)
|
||||
{
|
||||
m_ppi_port_outputs[1][0] = data;
|
||||
}
|
||||
|
||||
void pmd85_state::pmd85_ppi_1_portb_w(uint8_t data)
|
||||
void pmd85_state::ppi1_portb_w(uint8_t data)
|
||||
{
|
||||
m_ppi_port_outputs[1][1] = data;
|
||||
}
|
||||
|
||||
void pmd85_state::pmd85_ppi_1_portc_w(uint8_t data)
|
||||
void pmd85_state::ppi1_portc_w(uint8_t data)
|
||||
{
|
||||
m_ppi_port_outputs[1][2] = data;
|
||||
}
|
||||
@ -347,32 +336,32 @@ void pmd85_state::pmd85_ppi_1_portc_w(uint8_t data)
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
uint8_t pmd85_state::pmd85_ppi_2_porta_r()
|
||||
uint8_t pmd85_state::ppi2_porta_r()
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
uint8_t pmd85_state::pmd85_ppi_2_portb_r()
|
||||
uint8_t pmd85_state::ppi2_portb_r()
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
uint8_t pmd85_state::pmd85_ppi_2_portc_r()
|
||||
uint8_t pmd85_state::ppi2_portc_r()
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
void pmd85_state::pmd85_ppi_2_porta_w(uint8_t data)
|
||||
void pmd85_state::ppi2_porta_w(uint8_t data)
|
||||
{
|
||||
m_ppi_port_outputs[2][0] = data;
|
||||
}
|
||||
|
||||
void pmd85_state::pmd85_ppi_2_portb_w(uint8_t data)
|
||||
void pmd85_state::ppi2_portb_w(uint8_t data)
|
||||
{
|
||||
m_ppi_port_outputs[2][1] = data;
|
||||
}
|
||||
|
||||
void pmd85_state::pmd85_ppi_2_portc_w(uint8_t data)
|
||||
void pmd85_state::ppi2_portc_w(uint8_t data)
|
||||
{
|
||||
m_ppi_port_outputs[2][2] = data;
|
||||
}
|
||||
@ -403,35 +392,35 @@ void pmd85_state::pmd85_ppi_2_portc_w(uint8_t data)
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
uint8_t pmd85_state::pmd85_ppi_3_porta_r()
|
||||
uint8_t pmd85_state::ppi3_porta_r()
|
||||
{
|
||||
if (memregion("user1")->base() != nullptr)
|
||||
if (memregion("user1")->base())
|
||||
return memregion("user1")->base()[m_ppi_port_outputs[3][1] | (m_ppi_port_outputs[3][2] << 8)];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8_t pmd85_state::pmd85_ppi_3_portb_r()
|
||||
uint8_t pmd85_state::ppi3_portb_r()
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
uint8_t pmd85_state::pmd85_ppi_3_portc_r()
|
||||
uint8_t pmd85_state::ppi3_portc_r()
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
void pmd85_state::pmd85_ppi_3_porta_w(uint8_t data)
|
||||
void pmd85_state::ppi3_porta_w(uint8_t data)
|
||||
{
|
||||
m_ppi_port_outputs[3][0] = data;
|
||||
}
|
||||
|
||||
void pmd85_state::pmd85_ppi_3_portb_w(uint8_t data)
|
||||
void pmd85_state::ppi3_portb_w(uint8_t data)
|
||||
{
|
||||
m_ppi_port_outputs[3][1] = data;
|
||||
}
|
||||
|
||||
void pmd85_state::pmd85_ppi_3_portc_w(uint8_t data)
|
||||
void pmd85_state::ppi3_portc_w(uint8_t data)
|
||||
{
|
||||
m_ppi_port_outputs[3][2] = data;
|
||||
}
|
||||
@ -459,7 +448,7 @@ void pmd85_state::pmd85_ppi_3_portc_w(uint8_t data)
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
uint8_t pmd85_state::pmd85_io_r(offs_t offset)
|
||||
uint8_t pmd85_state::io_r(offs_t offset)
|
||||
{
|
||||
if (m_startup_mem_map)
|
||||
{
|
||||
@ -472,7 +461,7 @@ uint8_t pmd85_state::pmd85_io_r(offs_t offset)
|
||||
switch (offset & 0x80)
|
||||
{
|
||||
case 0x80: /* Motherboard 8255 */
|
||||
return m_ppi8255_0->read(offset & 0x03);
|
||||
return m_ppi0->read(offset & 0x03);
|
||||
}
|
||||
break;
|
||||
case 0x08: /* ROM module connector */
|
||||
@ -481,7 +470,7 @@ uint8_t pmd85_state::pmd85_io_r(offs_t offset)
|
||||
switch (offset & 0x80)
|
||||
{
|
||||
case 0x80: /* ROM module 8255 */
|
||||
return m_ppi8255_3->read(offset & 0x03);
|
||||
return m_ppi3->read(offset & 0x03);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -494,11 +483,11 @@ uint8_t pmd85_state::pmd85_io_r(offs_t offset)
|
||||
case 0x10: /* 8251 (cassette recorder, V24) */
|
||||
return m_uart->read(offset & 0x01);
|
||||
case 0x40: /* 8255 (GPIO/0, GPIO/1) */
|
||||
return m_ppi8255_1->read(offset & 0x03);
|
||||
return m_ppi1->read(offset & 0x03);
|
||||
case 0x50: /* 8253 */
|
||||
return m_pit8253->read(offset & 0x03);
|
||||
return m_pit->read(offset & 0x03);
|
||||
case 0x70: /* 8255 (IMS-2) */
|
||||
return m_ppi8255_2->read(offset & 0x03);
|
||||
return m_ppi2->read(offset & 0x03);
|
||||
}
|
||||
break;
|
||||
case 0x80: /* external interfaces */
|
||||
@ -513,7 +502,7 @@ uint8_t pmd85_state::pmd85_io_r(offs_t offset)
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
void pmd85_state::pmd85_io_w(offs_t offset, uint8_t data)
|
||||
void pmd85_state::io_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
if (m_startup_mem_map)
|
||||
{
|
||||
@ -527,7 +516,7 @@ void pmd85_state::pmd85_io_w(offs_t offset, uint8_t data)
|
||||
switch (offset & 0x80)
|
||||
{
|
||||
case 0x80: /* Motherboard 8255 */
|
||||
m_ppi8255_0->write(offset & 0x03, data);
|
||||
m_ppi0->write(offset & 0x03, data);
|
||||
/* PMD-85.3 memory banking */
|
||||
if ((offset & 0x03) == 0x03)
|
||||
{
|
||||
@ -543,7 +532,7 @@ void pmd85_state::pmd85_io_w(offs_t offset, uint8_t data)
|
||||
switch (offset & 0x80)
|
||||
{
|
||||
case 0x80: /* ROM module 8255 */
|
||||
m_ppi8255_3->write(offset & 0x03, data);
|
||||
m_ppi3->write(offset & 0x03, data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -558,14 +547,14 @@ void pmd85_state::pmd85_io_w(offs_t offset, uint8_t data)
|
||||
m_uart->write(offset & 0x01, data);
|
||||
break;
|
||||
case 0x40: /* 8255 (GPIO/0, GPIO/0) */
|
||||
m_ppi8255_1->write(offset & 0x03, data);
|
||||
m_ppi1->write(offset & 0x03, data);
|
||||
break;
|
||||
case 0x50: /* 8253 */
|
||||
m_pit8253->write(offset & 0x03, data);
|
||||
m_pit->write(offset & 0x03, data);
|
||||
logerror ("8253 writing. Address: %02x, Data: %02x\n", offset, data);
|
||||
break;
|
||||
case 0x70: /* 8255 (IMS-2) */
|
||||
m_ppi8255_2->write(offset & 0x03, data);
|
||||
m_ppi2->write(offset & 0x03, data);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -602,7 +591,7 @@ uint8_t pmd85_state::mato_io_r(offs_t offset)
|
||||
switch (offset & 0x80)
|
||||
{
|
||||
case 0x80: /* Motherboard 8255 */
|
||||
return m_ppi8255_0->read(offset & 0x03);
|
||||
return m_ppi0->read(offset & 0x03);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -625,7 +614,7 @@ void pmd85_state::mato_io_w(offs_t offset, uint8_t data)
|
||||
switch (offset & 0x80)
|
||||
{
|
||||
case 0x80: /* Motherboard 8255 */
|
||||
return m_ppi8255_0->write(offset & 0x03, data);
|
||||
return m_ppi0->write(offset & 0x03, data);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -636,19 +625,19 @@ void pmd85_state::device_timer(emu_timer &timer, device_timer_id id, int param,
|
||||
switch (id)
|
||||
{
|
||||
case TIMER_CASSETTE:
|
||||
pmd85_cassette_timer_callback(ptr, param);
|
||||
cassette_timer_callback(ptr, param);
|
||||
break;
|
||||
default:
|
||||
throw emu_fatalerror("Unknown id in pmd85_state::device_timer");
|
||||
}
|
||||
}
|
||||
|
||||
TIMER_CALLBACK_MEMBER(pmd85_state::pmd85_cassette_timer_callback)
|
||||
TIMER_CALLBACK_MEMBER(pmd85_state::cassette_timer_callback)
|
||||
{
|
||||
bool data;
|
||||
bool current_level;
|
||||
|
||||
if (!(m_io_dsw0->read() & 0x02)) /* V.24 / Tape Switch */
|
||||
if (!BIT(m_io_dsw0->read(), 1)) /* V.24 / Tape Switch */
|
||||
{
|
||||
/* tape reading */
|
||||
if (m_cassette->get_state()&CASSETTE_PLAY)
|
||||
@ -711,18 +700,8 @@ INPUT_CHANGED_MEMBER(pmd85_state::pmd85_reset)
|
||||
machine().schedule_soft_reset();
|
||||
}
|
||||
|
||||
void pmd85_state::pmd85_common_driver_init()
|
||||
void pmd85_state::common_driver_init()
|
||||
{
|
||||
static const char *const keynames[] = {
|
||||
"KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", "KEY6", "KEY7",
|
||||
"KEY8", "KEY9", "KEY10", "KEY11", "KEY12", "KEY13", "KEY14", "KEY15"
|
||||
};
|
||||
|
||||
for ( int i = 0; i < 16; i++ )
|
||||
{
|
||||
m_io_port[i] = ioport( keynames[i] );
|
||||
}
|
||||
|
||||
m_previous_level = 0;
|
||||
m_clk_level = m_clk_level_tape = 1;
|
||||
m_cassette_timer = timer_alloc(TIMER_CASSETTE);
|
||||
@ -733,67 +712,52 @@ void pmd85_state::init_pmd851()
|
||||
{
|
||||
m_model = PMD85_1;
|
||||
update_memory = &pmd85_state::pmd851_update_memory;
|
||||
pmd85_common_driver_init();
|
||||
common_driver_init();
|
||||
}
|
||||
|
||||
void pmd85_state::init_pmd852()
|
||||
{
|
||||
m_model = PMD85_2;
|
||||
update_memory = &pmd85_state::pmd851_update_memory;
|
||||
pmd85_common_driver_init();
|
||||
common_driver_init();
|
||||
}
|
||||
|
||||
void pmd85_state::init_pmd852a()
|
||||
{
|
||||
m_model = PMD85_2A;
|
||||
update_memory = &pmd85_state::pmd852a_update_memory;
|
||||
pmd85_common_driver_init();
|
||||
common_driver_init();
|
||||
}
|
||||
|
||||
void pmd85_state::init_pmd853()
|
||||
{
|
||||
m_model = PMD85_3;
|
||||
update_memory = &pmd85_state::pmd853_update_memory;
|
||||
pmd85_common_driver_init();
|
||||
common_driver_init();
|
||||
}
|
||||
|
||||
void pmd85_state::init_alfa()
|
||||
{
|
||||
m_model = ALFA;
|
||||
update_memory = &pmd85_state::alfa_update_memory;
|
||||
pmd85_common_driver_init();
|
||||
common_driver_init();
|
||||
}
|
||||
|
||||
void pmd85_state::init_mato()
|
||||
{
|
||||
m_model = MATO;
|
||||
update_memory = &pmd85_state::mato_update_memory;
|
||||
|
||||
static const char *const keynames[] = {
|
||||
"KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", "KEY6", "KEY7", "KEY8"
|
||||
};
|
||||
|
||||
for ( int i = 0; i < 9; i++ )
|
||||
{
|
||||
m_io_port[i] = ioport( keynames[i] );
|
||||
}
|
||||
for ( int i = 9; i < 16; i++ )
|
||||
{
|
||||
m_io_port[i] = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void pmd85_state::init_c2717()
|
||||
{
|
||||
m_model = C2717;
|
||||
update_memory = &pmd85_state::c2717_update_memory;
|
||||
pmd85_common_driver_init();
|
||||
common_driver_init();
|
||||
}
|
||||
|
||||
void pmd85_state::machine_reset()
|
||||
{
|
||||
int i, j;
|
||||
|
||||
/* checking for Rom Module */
|
||||
m_rom_module_present = 0;
|
||||
switch (m_model)
|
||||
@ -810,13 +774,28 @@ void pmd85_state::machine_reset()
|
||||
break;
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
for (j = 0; j < 3; j++)
|
||||
for (u8 i = 0; i < 4; i++)
|
||||
for (u8 j = 0; j < 3; j++)
|
||||
m_ppi_port_outputs[i][j] = 0;
|
||||
|
||||
/* memory initialization */
|
||||
memset(m_ram->pointer(), 0, sizeof(unsigned char)*0x10000);
|
||||
m_pmd853_memory_mapping = 1;
|
||||
m_startup_mem_map = 1;
|
||||
(this->*update_memory)();
|
||||
}
|
||||
|
||||
void pmd85_state::machine_start()
|
||||
{
|
||||
m_leds.resolve();
|
||||
save_item(NAME(m_txd));
|
||||
save_item(NAME(m_rts));
|
||||
save_item(NAME(m_rom_module_present));
|
||||
save_item(NAME(m_ppi_port_outputs));
|
||||
save_item(NAME(m_startup_mem_map));
|
||||
save_item(NAME(m_pmd853_memory_mapping));
|
||||
save_item(NAME(m_previous_level));
|
||||
save_item(NAME(m_clk_level));
|
||||
save_item(NAME(m_clk_level_tape));
|
||||
save_item(NAME(m_model));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user