summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/intv.cpp
diff options
context:
space:
mode:
author Frank Palazzolo <frank@avoidspikes.com>2017-02-07 22:26:41 -0500
committer ajrhacker <ajrhacker@users.noreply.github.com>2017-02-07 22:26:41 -0500
commit8ef98237ab5dfcf61c95f5f30e40ab83282b8d24 (patch)
treea19eeb1d957798f5a7485836edab10f4f0aa1df1 /src/mame/drivers/intv.cpp
parent5990685b53bb4a47cb5a3ca3f75619b7449fa6aa (diff)
intvkbd - mostly internal driver improvements (#2045)
WIP - commit. Not much visible progress yet, except that the screen alignment is now correct. But internally things are getting better. Rebased on top of mame0182 Changed intvkbd to use generic TMS9927 support Modded TMS9927 to allow for driver-specific overscan areas Aligned STIC and TMS9927 graphics properly Added prelim support for testing intvkbd printer Add proper documented memory addresses for tape drive Bring in commented tape drive code from old MESS source (wip)
Diffstat (limited to 'src/mame/drivers/intv.cpp')
-rw-r--r--src/mame/drivers/intv.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/mame/drivers/intv.cpp b/src/mame/drivers/intv.cpp
index c73695c5d33..d29ffaf0e59 100644
--- a/src/mame/drivers/intv.cpp
+++ b/src/mame/drivers/intv.cpp
@@ -53,6 +53,7 @@ RO-3-9506 = 8KiB (4Kiw) self decoding address mask rom with external address dec
#include "emu.h"
#include "cpu/m6502/m6502.h"
#include "cpu/cp1610/cp1610.h"
+#include "video/tms9927.h"
#include "includes/intv.h"
#include "sound/ay8910.h"
#include "softlist.h"
@@ -236,7 +237,7 @@ static INPUT_PORTS_START( intvkbd )
PORT_START("ROW7")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+')
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('O') PORT_CHAR(')')
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')')
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*')
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('\xA2')
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
@@ -409,8 +410,10 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( intvkbd2_mem , AS_PROGRAM, 8, intv_state )
ADDRESS_MAP_UNMAP_HIGH /* Required because of probing */
AM_RANGE(0x0000, 0x3fff) AM_READWRITE(intvkbd_dualport8_lsb_r, intvkbd_dualport8_lsb_w) /* Dual-port RAM */
- AM_RANGE(0x4000, 0x7fff) AM_READWRITE(intvkbd_dualport8_msb_r, intvkbd_dualport8_msb_w) /* Dual-port RAM */
- AM_RANGE(0xb7f8, 0xb7ff) AM_RAM /* ??? */
+ AM_RANGE(0x4000, 0x40bf) AM_READWRITE(intvkbd_io_r, intvkbd_io_w)
+ AM_RANGE(0x40c0, 0x40cf) AM_DEVREADWRITE("crtc", tms9927_device, read, write)
+ AM_RANGE(0x4200, 0x7fff) AM_READWRITE(intvkbd_dualport8_msb_r, intvkbd_dualport8_msb_w) /* Dual-port RAM */
+ AM_RANGE(0xb7f8, 0xb7ff) AM_READWRITE(intvkbd_periph_r, intvkbd_periph_w)
AM_RANGE(0xb800, 0xbfff) AM_RAM AM_SHARE("videoram") /* Text Display */
AM_RANGE(0xc000, 0xdfff) AM_ROM
AM_RANGE(0xe000, 0xffff) AM_READ(intvkb_iocart_r)
@@ -538,9 +541,13 @@ static MACHINE_CONFIG_DERIVED( intvkbd, intv )
MCFG_PALETTE_MODIFY("palette")
MCFG_PALETTE_INIT_OWNER(intv_state, intv)
+ /* crt controller */
+ MCFG_DEVICE_ADD("crtc", TMS9927, XTAL_7_15909MHz)
+ MCFG_TMS9927_CHAR_WIDTH(8)
+ MCFG_TMS9927_OVERSCAN(STIC_OVERSCAN_LEFT_WIDTH*STIC_X_SCALE*INTVKBD_X_SCALE, STIC_OVERSCAN_RIGHT_WIDTH*STIC_X_SCALE*INTVKBD_X_SCALE,
+ STIC_OVERSCAN_TOP_HEIGHT*STIC_Y_SCALE*INTVKBD_Y_SCALE, STIC_OVERSCAN_BOTTOM_HEIGHT*STIC_Y_SCALE*INTVKBD_Y_SCALE)
+
MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_SIZE((STIC_OVERSCAN_LEFT_WIDTH+STIC_BACKTAB_WIDTH*STIC_CARD_WIDTH-1+STIC_OVERSCAN_RIGHT_WIDTH)*STIC_X_SCALE*INTVKBD_X_SCALE, (STIC_OVERSCAN_TOP_HEIGHT+STIC_BACKTAB_HEIGHT*STIC_CARD_HEIGHT+STIC_OVERSCAN_BOTTOM_HEIGHT)*STIC_Y_SCALE*INTVKBD_Y_SCALE)
- MCFG_SCREEN_VISIBLE_AREA(0, (STIC_OVERSCAN_LEFT_WIDTH+STIC_BACKTAB_WIDTH*STIC_CARD_WIDTH-1+STIC_OVERSCAN_RIGHT_WIDTH)*STIC_X_SCALE*INTVKBD_X_SCALE-1, 0, (STIC_OVERSCAN_TOP_HEIGHT+STIC_BACKTAB_HEIGHT*STIC_CARD_HEIGHT+STIC_OVERSCAN_BOTTOM_HEIGHT)*STIC_Y_SCALE*INTVKBD_Y_SCALE-1)
MCFG_SCREEN_UPDATE_DRIVER(intv_state, screen_update_intvkbd)
/* I/O cartslots for BASIC */