mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
(MESS) Pencil2 : fixed screen size problem (nw)
Thanks to Lord Nightmare.
This commit is contained in:
parent
2e2e2a9d96
commit
8a623b05fa
@ -68,8 +68,6 @@ ToDo:
|
||||
- Cassette isn't working
|
||||
- Joysticks (no info)
|
||||
- Cart slot (only 1 cart has been dumped, so probably no point coding it)
|
||||
- Screen size is wrong in BASIC. Should be 24 lines of text with a wide
|
||||
border all around. (changed to NTSC to fix it for now)
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
@ -97,7 +95,7 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(port30_w);
|
||||
DECLARE_WRITE8_MEMBER(port80_w);
|
||||
DECLARE_WRITE8_MEMBER(portc0_w);
|
||||
DECLARE_READ8_MEMBER(porte0_r);
|
||||
DECLARE_READ8_MEMBER(porte2_r);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(printer_ready_r);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(printer_ack_r);
|
||||
virtual void machine_reset();
|
||||
@ -124,20 +122,22 @@ static ADDRESS_MAP_START(pencil2_io, AS_IO, 8, pencil2_state)
|
||||
AM_RANGE(0xa0, 0xa0) AM_MIRROR(0x1e) AM_DEVREADWRITE("tms9928a", tms9928a_device, vram_read, vram_write)
|
||||
AM_RANGE(0xa1, 0xa1) AM_MIRROR(0x1e) AM_DEVREADWRITE("tms9928a", tms9928a_device, register_read, register_write)
|
||||
AM_RANGE(0xc0, 0xdf) AM_WRITE(portc0_w)
|
||||
AM_RANGE(0xe0, 0xff) AM_READ(porte0_r) AM_DEVWRITE("sn76489a", sn76489a_device, write)
|
||||
AM_RANGE(0xe0, 0xff) AM_DEVWRITE("sn76489a", sn76489a_device, write)
|
||||
AM_RANGE(0xe0, 0xe0) AM_READ_PORT("E0")
|
||||
AM_RANGE(0xe1, 0xe1) AM_READ_PORT("E1")
|
||||
AM_RANGE(0xe2, 0xe2) AM_READ(porte2_r)
|
||||
AM_RANGE(0xe3, 0xe3) AM_READ_PORT("E3")
|
||||
AM_RANGE(0xe4, 0xe4) AM_READ_PORT("E4")
|
||||
AM_RANGE(0xe6, 0xe6) AM_READ_PORT("E6")
|
||||
AM_RANGE(0xe8, 0xe8) AM_READ_PORT("E8")
|
||||
AM_RANGE(0xea, 0xea) AM_READ_PORT("EA")
|
||||
AM_RANGE(0xf0, 0xf0) AM_READ_PORT("F0")
|
||||
AM_RANGE(0xf2, 0xf2) AM_READ_PORT("F2")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
READ8_MEMBER( pencil2_state::porte0_r)
|
||||
READ8_MEMBER( pencil2_state::porte2_r)
|
||||
{
|
||||
if (offset==2)
|
||||
return (m_cass->input() > 0.1);
|
||||
else
|
||||
{
|
||||
char kbdrow[6];
|
||||
sprintf(kbdrow,"X%X",offset);
|
||||
//printf("%X ",offset);
|
||||
return ioport( kbdrow )->read();
|
||||
}
|
||||
return (m_cass->input() > 0.1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( pencil2_state::port10_w )
|
||||
@ -171,7 +171,7 @@ CUSTOM_INPUT_MEMBER( pencil2_state::printer_ack_r )
|
||||
|
||||
/* Input ports */
|
||||
static INPUT_PORTS_START( pencil2 )
|
||||
PORT_START("X0")
|
||||
PORT_START("E0")
|
||||
// port_custom MUST be ACTIVE_HIGH to work
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RIGHT)
|
||||
@ -182,7 +182,7 @@ static INPUT_PORTS_START( pencil2 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Break") PORT_CODE(KEYCODE_END)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pencil2_state, printer_ack_r, " ")
|
||||
|
||||
PORT_START("X1")
|
||||
PORT_START("E1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('j') PORT_CHAR('@')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('>')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('<')
|
||||
@ -192,7 +192,7 @@ static INPUT_PORTS_START( pencil2 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR('n')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("X3")
|
||||
PORT_START("E3")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ESC) PORT_CHAR(27)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(32)
|
||||
@ -202,7 +202,7 @@ static INPUT_PORTS_START( pencil2 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('h')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("X4")
|
||||
PORT_START("E4")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHAR('o')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHAR('p')
|
||||
@ -212,7 +212,7 @@ static INPUT_PORTS_START( pencil2 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHAR('t')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("X6")
|
||||
PORT_START("E6")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR('q')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHAR('w')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('x')
|
||||
@ -222,7 +222,7 @@ static INPUT_PORTS_START( pencil2 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("X8")
|
||||
PORT_START("E8")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR('*')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHAR('l') PORT_CHAR('/')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CHAR('+')
|
||||
@ -232,7 +232,7 @@ static INPUT_PORTS_START( pencil2 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHAR('g')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("XA")
|
||||
PORT_START("EA")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHAR('z')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHAR('a')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('s')
|
||||
@ -242,7 +242,7 @@ static INPUT_PORTS_START( pencil2 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CHAR('y')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("X10")
|
||||
PORT_START("F0")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('^')
|
||||
@ -252,7 +252,7 @@ static INPUT_PORTS_START( pencil2 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("X12")
|
||||
PORT_START("F2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
|
||||
@ -273,7 +273,7 @@ static const sn76496_config psg_intf =
|
||||
DEVCB_NULL
|
||||
};
|
||||
|
||||
static TMS9928A_INTERFACE(pencil2_tms9928a_interface)
|
||||
static TMS9928A_INTERFACE(pencil2_tms9929a_interface)
|
||||
{
|
||||
"screen", // screen tag
|
||||
0x4000, // vram size
|
||||
@ -287,8 +287,8 @@ static MACHINE_CONFIG_START( pencil2, pencil2_state )
|
||||
MCFG_CPU_IO_MAP(pencil2_io)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_TMS9928A_ADD( "tms9928a", TMS9928A, pencil2_tms9928a_interface )
|
||||
MCFG_TMS9928A_SCREEN_ADD_NTSC( "screen" ) // should be PAL but it has issues
|
||||
MCFG_TMS9928A_ADD( "tms9928a", TMS9929A, pencil2_tms9929a_interface )
|
||||
MCFG_TMS9928A_SCREEN_ADD_PAL( "screen" )
|
||||
MCFG_SCREEN_UPDATE_DEVICE( "tms9928a", tms9928a_device, screen_update )
|
||||
|
||||
// sound hardware
|
||||
|
Loading…
Reference in New Issue
Block a user