mirror of
https://github.com/holub/mame
synced 2025-04-24 17:30:55 +03:00
pg685.cpp: Give pg675 its own config (nw)
- Fill out memory maps, adding I/O handler stubs based on disassembly and notes
This commit is contained in:
parent
57d7d67812
commit
23760334ce
@ -32,33 +32,8 @@ Backplane: SCN2661B, D8253C-2, SAB 8259AP
|
||||
|
||||
6ES5685-OUA11
|
||||
|
||||
John Elliott's kindly analyzed the ROM of this machine, his findings are represented
|
||||
in this preliminary memory map. Olivier Galibert remarked that for a 16 bit memory
|
||||
map, the address ranges have to begin on even and end on odd addresses.
|
||||
|
||||
static ADDRESS_MAP_START(pg685_mem, AS_PROGRAM, 16, pg685_state)
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE(0x00000,0xbffff) AM_RAM
|
||||
AM_RANGE(0xf0000,0xf1fff) AM_RAM
|
||||
AM_RANGE(0xf9f00,0xf9f00) // Keyboard scancode
|
||||
AM_RANGE(0xf9f01,0xf9f01) // Keyboard status (read) Keyboard command (write)
|
||||
AM_RANGE(0xf9f02,0xf9f02) // 6845 Register select
|
||||
AM_RANGE(0xf9f03,0xf9f03) // 6845 Register value
|
||||
AM_RANGE(0xf9f04,0xf9f04) // PCP/M-86 keyboard handling code also checks a couple of bits read
|
||||
AM_RANGE(0xf9f20,0xf9f20) // WD 279x floppy controller
|
||||
AM_RANGE(0xf9f30,0xf9f30) // Printer data
|
||||
AM_RANGE(0xf9f31,0xf9f31) // Printer status read
|
||||
AM_RANGE(0xf9f33,0xf9f33) // Printer present?
|
||||
AM_RANGE(0xf9f42,0xf9f47) // RTC registers
|
||||
AM_RANGE(0xf9f48,0xf9f4c) // NVRAM
|
||||
AM_RANGE(0xf9f50,0xf9f50) // RTC Busy flag
|
||||
AM_RANGE(0xf9f70,0xf9f77) // WD 1010
|
||||
AM_RANGE(0xf9f78,0xf9f78) // WD 1010 separate drive/head select register
|
||||
AM_RANGE(0xf9f79,0xf9f79) // another write-only register (possibly reset or interrupt control)
|
||||
AM_RANGE(0xfa000,0xfa7ff) AM_RAM AM_SHARE ("charcopy")
|
||||
AM_RANGE(0xfb000,0xfb7ff) AM_RAM AM_SHARE ("framebuffer")
|
||||
AM_RANGE(0xfc000,0xfffff) AM_ROM AM_REGION("bios", 0)
|
||||
ADDRESS_MAP_END
|
||||
John Elliott's kindly analyzed the ROM of this machine; his findings are represented
|
||||
in the preliminary memory map.
|
||||
|
||||
This machine only has a textmode screen, Tandon TM262 hard disk drive on a WD1010 controller,
|
||||
Teac FD-55FV-13-U floppy drive on a Siemens (WD)-1797-02P controller, 768KB of RAM, HD68A45SP
|
||||
@ -105,6 +80,7 @@ Memory: 54x 64KBit RAM, 18 empty sockets, 9 bit and 4 bit wire straps
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/nec/nec.h"
|
||||
#include "cpu/i86/i86.h"
|
||||
#include "cpu/i86/i286.h"
|
||||
#include "video/mc6845.h"
|
||||
#include "machine/i8251.h"
|
||||
@ -134,7 +110,19 @@ public:
|
||||
|
||||
MC6845_UPDATE_ROW(crtc_update_row);
|
||||
MC6845_UPDATE_ROW(crtc_update_row_oua12);
|
||||
|
||||
|
||||
DECLARE_READ8_MEMBER(f9f04_r);
|
||||
DECLARE_WRITE8_MEMBER(f9f04_w);
|
||||
DECLARE_READ8_MEMBER(f9f24_r);
|
||||
DECLARE_WRITE8_MEMBER(f9f24_w);
|
||||
DECLARE_WRITE8_MEMBER(f9f32_w);
|
||||
DECLARE_READ8_MEMBER(f9f33_r);
|
||||
DECLARE_WRITE8_MEMBER(f9f3e_w);
|
||||
DECLARE_READ8_MEMBER(f9f3f_r);
|
||||
DECLARE_READ8_MEMBER(f9f78_r);
|
||||
DECLARE_WRITE8_MEMBER(f9f78_w);
|
||||
DECLARE_WRITE8_MEMBER(f9f79_w);
|
||||
|
||||
private:
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
@ -148,50 +136,70 @@ private:
|
||||
// ADDRESS MAPS
|
||||
//**************************************************************************
|
||||
|
||||
static ADDRESS_MAP_START(pg685_mem, AS_PROGRAM, 8, pg685_state)
|
||||
static ADDRESS_MAP_START(pg675_mem, AS_PROGRAM, 8, pg685_state)
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE(0x00000,0xbffff) AM_RAM
|
||||
AM_RANGE(0xf0000,0xf1fff) AM_RAM
|
||||
AM_RANGE(0xf9f00, 0xf9f01) AM_DEVREADWRITE("kbdc", i8279_device, read, write)
|
||||
AM_RANGE(0xf9f02, 0xf9f02) AM_DEVREADWRITE("crtc", mc6845_device, status_r, address_w)
|
||||
AM_RANGE(0xf9f03, 0xf9f03) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w)
|
||||
AM_RANGE(0xf9f04, 0xf9f04) AM_READWRITE(f9f04_r, f9f04_w)
|
||||
AM_RANGE(0xf9f06, 0xf9f07) AM_DEVREADWRITE("mainpic", pic8259_device, read, write)
|
||||
AM_RANGE(0xf9f08, 0xf9f08) AM_DEVREADWRITE("mainuart", i8251_device, data_r, data_w)
|
||||
AM_RANGE(0xf9f09, 0xf9f09) AM_DEVREADWRITE("mainuart", i8251_device, status_r, control_w)
|
||||
AM_RANGE(0xf9f20, 0xf9f23) AM_DEVREADWRITE("fdc", wd2797_t, read, write)
|
||||
AM_RANGE(0xf9f24, 0xf9f24) AM_READWRITE(f9f24_r, f9f24_w)
|
||||
AM_RANGE(0xf9f28, 0xf9f2b) AM_DEVREADWRITE("modppi1", i8255_device, read, write)
|
||||
AM_RANGE(0xf9f2c, 0xf9f2f) AM_DEVREADWRITE("modppi2", i8255_device, read, write)
|
||||
AM_RANGE(0xf9f30, 0xf9f30) AM_DEVREADWRITE("moduart", i8251_device, data_r, data_w)
|
||||
AM_RANGE(0xf9f31, 0xf9f31) AM_DEVREADWRITE("moduart", i8251_device, status_r, control_w)
|
||||
AM_RANGE(0xf9f34, 0xf9f37) AM_DEVREADWRITE("bppit", pit8253_device, read, write)
|
||||
AM_RANGE(0xf9f38, 0xf9f3b) AM_DEVREADWRITE("bpuart", mc2661_device, read, write)
|
||||
AM_RANGE(0xf9f3c, 0xf9f3d) AM_DEVREADWRITE("bppic", pic8259_device, read, write)
|
||||
AM_RANGE(0xf9f32, 0xf9f32) AM_WRITE(f9f32_w)
|
||||
AM_RANGE(0xf9f33, 0xf9f33) AM_READ(f9f33_r)
|
||||
AM_RANGE(0xf9f40, 0xf9f5f) AM_DEVREADWRITE("rtc", mm58167_device, read, write)
|
||||
AM_RANGE(0xf9f70, 0xf9f77) AM_DEVREADWRITE("hdc", wd2010_device, read, write)
|
||||
AM_RANGE(0xfa000,0xfa7ff) AM_RAM AM_SHARE ("charcopy")
|
||||
AM_RANGE(0xfb000,0xfb7ff) AM_RAM AM_SHARE ("framebuffer")
|
||||
AM_RANGE(0xfc000,0xfffff) AM_ROM AM_REGION("bios", 0)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START(pg685_mem, AS_PROGRAM, 8, pg685_state)
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_IMPORT_FROM(pg675_mem)
|
||||
AM_RANGE(0xf9f34, 0xf9f37) AM_DEVREADWRITE("bppit", pit8253_device, read, write)
|
||||
AM_RANGE(0xf9f38, 0xf9f3b) AM_DEVREADWRITE("bpuart", mc2661_device, read, write)
|
||||
AM_RANGE(0xf9f3c, 0xf9f3d) AM_DEVREADWRITE("bppic", pic8259_device, read, write)
|
||||
AM_RANGE(0xf9f3e, 0xf9f3e) AM_WRITE(f9f3e_w)
|
||||
AM_RANGE(0xf9f70, 0xf9f77) AM_DEVREADWRITE("hdc", wd2010_device, read, write)
|
||||
AM_RANGE(0xf9f78, 0xf9f78) AM_READWRITE(f9f78_r, f9f78_w)
|
||||
AM_RANGE(0xf9f79, 0xf9f79) AM_WRITE(f9f79_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START(pg685oua12_mem, AS_PROGRAM, 16, pg685_state)
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE(0x00000,0xdffff) AM_RAM
|
||||
AM_RANGE(0xe0000,0xeffff) AM_RAM AM_SHARE ("framebuffer16")
|
||||
AM_RANGE(0xf0000,0xf1fff) AM_RAM
|
||||
AM_RANGE(0xf9f00, 0xf9f01) AM_DEVREADWRITE8("kbdc", i8279_device, read, write, 0xffff)
|
||||
AM_RANGE(0xf9f04, 0xf9f05) AM_READWRITE8(f9f04_r, f9f04_w, 0x00ff)
|
||||
AM_RANGE(0xf9f06, 0xf9f07) AM_DEVREADWRITE8("mainpic", pic8259_device, read, write, 0xffff)
|
||||
AM_RANGE(0xf9f08, 0xf9f09) AM_DEVREADWRITE8("mainuart", i8251_device, data_r, data_w, 0x00ff)
|
||||
AM_RANGE(0xf9f08, 0xf9f09) AM_DEVREADWRITE8("mainuart", i8251_device, status_r, control_w, 0xff00)
|
||||
AM_RANGE(0xf9f20, 0xf9f23) AM_DEVREADWRITE8("fdc", wd2797_t, read, write, 0xffff)
|
||||
AM_RANGE(0xf9f24, 0xf9f25) AM_READWRITE8(f9f24_r, f9f24_w, 0x00ff)
|
||||
AM_RANGE(0xf9f28, 0xf9f2b) AM_DEVREADWRITE8("modppi1", i8255_device, read, write, 0xffff)
|
||||
AM_RANGE(0xf9f2c, 0xf9f2f) AM_DEVREADWRITE8("modppi2", i8255_device, read, write, 0xffff)
|
||||
AM_RANGE(0xf9f30, 0xf9f31) AM_DEVREADWRITE8("moduart", i8251_device, data_r, data_w, 0x00ff)
|
||||
AM_RANGE(0xf9f30, 0xf9f31) AM_DEVREADWRITE8("moduart", i8251_device, status_r, control_w, 0xff00)
|
||||
AM_RANGE(0xf9f32, 0xf9f33) AM_WRITE8(f9f32_w, 0x00ff)
|
||||
AM_RANGE(0xf9f32, 0xf9f33) AM_READ8(f9f33_r, 0xff00)
|
||||
AM_RANGE(0xf9f34, 0xf9f37) AM_DEVREADWRITE8("bppit", pit8253_device, read, write, 0xffff)
|
||||
AM_RANGE(0xf9f38, 0xf9f3b) AM_DEVREADWRITE8("bpuart", mc2661_device, read, write, 0xffff)
|
||||
AM_RANGE(0xf9f3c, 0xf9f3d) AM_DEVREADWRITE8("bppic", pic8259_device, read, write, 0xffff)
|
||||
AM_RANGE(0xf9f3e, 0xf9f3f) AM_WRITE8(f9f3e_w, 0x00ff)
|
||||
AM_RANGE(0xf9f3e, 0xf9f3f) AM_READ8(f9f3f_r, 0xff00)
|
||||
AM_RANGE(0xf9f40, 0xf9f5f) AM_DEVREADWRITE8("rtc", mm58167_device, read, write, 0xffff)
|
||||
AM_RANGE(0xf9f70, 0xf9f77) AM_DEVREADWRITE8("hdc", wd2010_device, read, write, 0xffff)
|
||||
AM_RANGE(0xf9f78, 0xf9f79) AM_READWRITE8(f9f78_r, f9f78_w, 0x00ff)
|
||||
AM_RANGE(0xf9f78, 0xf9f79) AM_WRITE8(f9f79_w, 0xff00)
|
||||
AM_RANGE(0xf9f80, 0xf9f81) AM_DEVREADWRITE8("crtc", mc6845_device, status_r, address_w, 0x00ff)
|
||||
AM_RANGE(0xf9f80, 0xf9f81) AM_DEVREADWRITE8("crtc", mc6845_device, register_r, register_w, 0xff00)
|
||||
AM_RANGE(0xfc000,0xfffff) AM_RAM // BIOS RAM shadow
|
||||
@ -206,14 +214,81 @@ ADDRESS_MAP_END
|
||||
static INPUT_PORTS_START( pg685 )
|
||||
INPUT_PORTS_END
|
||||
|
||||
READ8_MEMBER(pg685_state::f9f04_r)
|
||||
{
|
||||
// PCP/M-86 keyboard handling code also checks a couple of bits read
|
||||
logerror("Reading byte from F9F04\n");
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(pg685_state::f9f04_w)
|
||||
{
|
||||
// PCP/M-86 keyboard handling code also checks a couple of bits read
|
||||
logerror("Writing %02X to F9F04\n", data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(pg685_state::f9f32_w)
|
||||
{
|
||||
// 1D written at startup
|
||||
logerror("Writing %02X to F9F32\n", data);
|
||||
}
|
||||
|
||||
READ8_MEMBER(pg685_state::f9f33_r)
|
||||
{
|
||||
// Printer present?
|
||||
logerror("Reading from F9F33\n");
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(pg685_state::f9f3e_w)
|
||||
{
|
||||
// 00 written at startup
|
||||
logerror("Writing %02X to F9F3E\n", data);
|
||||
}
|
||||
|
||||
READ8_MEMBER(pg685_state::f9f3f_r)
|
||||
{
|
||||
logerror("Reading from F9F3F\n");
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
// FLOPPY
|
||||
//**************************************************************************
|
||||
|
||||
READ8_MEMBER(pg685_state::f9f24_r)
|
||||
{
|
||||
logerror("Reading from F9F24\n");
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(pg685_state::f9f24_w)
|
||||
{
|
||||
logerror("Writing %02X to F9F24\n", data);
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
// HARDDISK
|
||||
//**************************************************************************
|
||||
|
||||
READ8_MEMBER(pg685_state::f9f78_r)
|
||||
{
|
||||
logerror("Reading from F9F78\n");
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(pg685_state::f9f78_w)
|
||||
{
|
||||
// WD 1010 separate drive/head select register
|
||||
logerror("Writing %02X to F9F78\n", data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(pg685_state::f9f79_w)
|
||||
{
|
||||
// another write-only register (possibly reset or interrupt control)
|
||||
logerror("Writing %02X to F9F79\n", data);
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
// MACHINE EMULATION
|
||||
//**************************************************************************
|
||||
@ -306,6 +381,47 @@ static MACHINE_CONFIG_FRAGMENT(pg685_module)
|
||||
MCFG_DEVICE_ADD("rtc", MM58167, XTAL_32_768kHz)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_START( pg675, pg685_state )
|
||||
// main cpu
|
||||
MCFG_CPU_ADD("maincpu", I8088, XTAL_15MHz / 3)
|
||||
MCFG_CPU_PROGRAM_MAP(pg675_mem)
|
||||
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mainpic", pic8259_device, inta_cb)
|
||||
|
||||
MCFG_PIC8259_ADD("mainpic", INPUTLINE("maincpu", 0), VCC, NOOP)
|
||||
|
||||
// i/o cpu
|
||||
|
||||
// ram
|
||||
|
||||
// video hardware
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_RAW_PARAMS(12288000, 882, 0, 720, 370, 0, 350 ) // not real values
|
||||
MCFG_SCREEN_UPDATE_DEVICE( "crtc", mc6845_device, screen_update )
|
||||
|
||||
MCFG_MC6845_ADD("crtc", MC6845, "screen", 12288000)
|
||||
MCFG_MC6845_SHOW_BORDER_AREA(false)
|
||||
MCFG_MC6845_CHAR_WIDTH(8)
|
||||
MCFG_MC6845_UPDATE_ROW_CB(pg685_state, crtc_update_row)
|
||||
|
||||
// sound hardware
|
||||
|
||||
// devices
|
||||
MCFG_FRAGMENT_ADD(pg685_module)
|
||||
|
||||
MCFG_DEVICE_ADD("mainuart", I8251, XTAL_12_288MHz / 6) // divider guessed
|
||||
|
||||
// rs232 port
|
||||
|
||||
// keyboard
|
||||
MCFG_DEVICE_ADD("kbdc", I8279, XTAL_12_288MHz / 6) // divider guessed
|
||||
MCFG_I8279_OUT_IRQ_CB(DEVWRITELINE("mainpic", pic8259_device, ir0_w))
|
||||
|
||||
// printer
|
||||
|
||||
// floppy
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_START( pg685, pg685_state )
|
||||
// main cpu
|
||||
MCFG_CPU_ADD("maincpu", V20, XTAL_15MHz / 3)
|
||||
@ -424,6 +540,6 @@ ROM_END
|
||||
// ROM DEFINITIONS
|
||||
//**************************************************************************
|
||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */
|
||||
COMP( 198?, pg675, 0, 0, pg685, pg685, driver_device, 0, "Siemens", "Simatic PG675", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
|
||||
COMP( 198?, pg675, 0, 0, pg675, pg685, driver_device, 0, "Siemens", "Simatic PG675", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
|
||||
COMP( 198?, pg685, 0, 0, pg685, pg685, driver_device, 0, "Siemens", "Simatic PG685 OUA11", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
|
||||
COMP( 198?, pg685oua12, pg685, 0, pg685oua12, pg685, driver_device, 0, "Siemens", "Simatic PG685 OUA12", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
|
||||
|
Loading…
Reference in New Issue
Block a user