diff options
author | Lord-Nightmare <Lord-Nightmare@users.noreply.github.com> | 2016-02-08 03:17:43 -0500 |
---|---|---|
committer | Lord-Nightmare <Lord-Nightmare@users.noreply.github.com> | 2016-02-08 03:17:43 -0500 |
commit | 8d339ed46dd8e04fdd864363961f0a48ef4c7194 (patch) | |
tree | 5e7ce6efd3a5c1ff7dc5a22951564bc0910d1df8 | |
parent | 03c8434a4f8d27d2d3ec7bbdaa31b13f89e17852 (diff) |
Xerox Notetaker: Corrected RAM amount. Attached the pic8259 interrupt controller, though no interrupts are attached to that yet. Added documentation of i/o writes during the boot process. [Lord Nightmare]
-rw-r--r-- | src/mame/drivers/notetaker.cpp | 50 |
1 files changed, 44 insertions, 6 deletions
diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp index d4822956ef0..70a3c4ea122 100644 --- a/src/mame/drivers/notetaker.cpp +++ b/src/mame/drivers/notetaker.cpp @@ -12,9 +12,9 @@ TODO: Pretty much everything. * Get bootrom/ram bankswitching working * Get the running machine smalltalk-78 memory dump loaded as a rom and forced into ram on startup, since no boot disks have survived -* floppy controller (rather complex and somewhat raw/low level) +* floppy controller wd1791 * crt5027 video controller -* pic8259 interrupt controller +* pic8259 interrupt controller - this is attached as a device, but the interrupts are not hooked to it yet. * i8251? serial/EIA controller * 6402 keyboard UART * HLE for the missing MCU which reads the mouse quadratures and buttons @@ -22,6 +22,7 @@ TODO: Pretty much everything. */ #include "cpu/i86/i86.h" +#include "machine/pic8259.h" //#include "video/tms9927.h" class notetaker_state : public driver_device @@ -29,12 +30,14 @@ class notetaker_state : public driver_device public: notetaker_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_maincpu(*this, "maincpu")//, + m_maincpu(*this, "maincpu"), + m_pic(*this, "pic8259")//, //m_vtac(*this, "crt5027") { } // devices required_device<cpu_device> m_maincpu; + required_device<pic8259_device> m_pic; //required_device<crt5027_device> m_vtac; //declarations @@ -47,14 +50,14 @@ public: static ADDRESS_MAP_START(notetaker_mem, AS_PROGRAM, 16, notetaker_state) // AM_RANGE(0x00000, 0x01fff) AM_RAM AM_RANGE(0x00000, 0x00fff) AM_ROM AM_REGION("maincpu", 0xFF000) // I think this copy of rom is actually banked via io reg 0x20, there is ram which lives behind here? - AM_RANGE(0x01000, 0x01fff) AM_RAM // ram lives here, or at least some of it does for the stack. - AM_RANGE(0xff000, 0xfffff) AM_ROM // is this banked too? + AM_RANGE(0x01000, 0x3ffff) AM_RAM // ram lives here, 256KB + AM_RANGE(0xff000, 0xfffff) AM_ROM // is this banked too? Don't think so... ADDRESS_MAP_END // io memory map comes from http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker/memos/19790605_Definition_of_8086_Ports.pdf static ADDRESS_MAP_START(notetaker_io, AS_IO, 16, notetaker_state) ADDRESS_MAP_UNMAP_HIGH - //AM_RANGE(0x02, 0x03) AM_READWRITE interrupt control register, high byte only + AM_RANGE(0x02, 0x03) AM_DEVREADWRITE8("pic8259", pic8259_device, read, write, 0xFF00) //AM_RANGE(0x20, 0x21) AM_WRITE processor (rom mapping, etc) control register //AM_RANGE(0x42, 0x43) AM_READ read keyboard data (high byte only) [from mcu?] //AM_RANGE(0x44, 0x45) AM_READ read keyboard fifo state (high byte only) [from mcu?] @@ -63,9 +66,40 @@ static ADDRESS_MAP_START(notetaker_io, AS_IO, 16, notetaker_state) //AM_RANGE(0x4c, 0x4d) AM_WRITE kbd data reset [to mcu?] //AM_RANGE(0x4e, 0x4f) AM_WRITE kbd chip [mcu?] reset [to mcu?] //AM_RANGE(0x60, 0x61) AM_WRITE DAC sample and hold and frequency setup + //AM_RANGE(0x100, 0x101) AM_WRITE I/O register (adc speed, crtc pixel clock enable, etc) //AM_RANGE(0x140, 0x15f) AM_DEVREADWRITE("crt5027", crt5027_device, read, write) ADDRESS_MAP_END +/* writes during boot: +0x88 to port 0x020 (PCR; boot sequence done(1), processor not locked(0), battery charger off(0), rom not disabled(0) correction off&cr4 off(1), cr3 on(0), cr2 on(0), cr1 on (0);) +0x02 to port 0x100 (IOR write: enable 5v only relay control for powering up 4116 dram enabled) +0x03 to port 0x100 (IOR write: in addition to above, enable 12v relay control for powering up 4116 dram enabled) +<dram memory 0x00000-0x3ffff is zeroed here> +0x13 to port 0x000 (?????) +0x08 to port 0x002 PIC (UART int enabled) +0x0D to port 0x002 PIC (UART, wd1791, and parity error int enabled) +0xff to port 0x002 PIC (all ints enabled) +0x0000 to port 0x04e (reset keyboard fifo/controller) +0x0000 to port 0x1ae (reset UART) +0x0016 to port 0x048 (kbd control reg write) +0x0005 to port 0x1a8 (UART control reg write) +0x5f to port 0x140 \ +0xf2 to port 0x142 \ +0x7d to port 0x144 \ +0x1d to port 0x146 \_ set up CRTC +0x04 to port 0x148 / +0x10 to port 0x14a / +0x00 to port 0x154 / +0x1e to port 0x15a / +0x0a03 to port 0x100 (IOR write: set bit clock to 12Mhz) +0x2a03 to port 0x100 (IOR write: enable crtc clock chain) +0x00 to port 0x15c (fire off crtc timing chain) +read from 0x0002 (byte wide) (check interrupts) <looking for vblank int or odd/even frame int here, most likely> +0xaf to port 0x002 PIC (mask out kb int and 30hz display int) +0x0400 to 0x060 (select DAC fifo frequency 2) +read from 0x44 (byte wide) in a loop forever (read keyboard fifo status) +*/ + /* Input ports */ static INPUT_PORTS_START( notetakr ) INPUT_PORTS_END @@ -75,6 +109,10 @@ static MACHINE_CONFIG_START( notetakr, notetaker_state ) MCFG_CPU_ADD("maincpu", I8086, XTAL_24MHz/3) /* 24Mhz crystal divided down by i8284 clock generator */ MCFG_CPU_PROGRAM_MAP(notetaker_mem) MCFG_CPU_IO_MAP(notetaker_io) + MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb) + MCFG_PIC8259_ADD("pic8259", INPUTLINE("maincpu", 0), VCC, NULL) + + //Note there is a second i8086 cpu on the 'emulator board', which is probably loaded with code once smalltalk boots /* video hardware */ /*MCFG_SCREEN_ADD("screen", RASTER) |