Previous 199869 Revisions Next

r19772 Monday 24th December, 2012 at 13:13:21 UTC by Robbbert
Pencil2 : Basic tries to start.
[src/mess/drivers]pencil2.c

trunk/src/mess/drivers/pencil2.c
r19771r19772
1717J2 Cart slot
1818J3 Memory expansion slot
1919J4 Printer slot
20J5,J6 Joystick ports
2021
2122XTAL 10.738 MHz
2223
24Output is to a TV on Australian Channel 1 (no monitor output)
25
2326U1     uPD780C-1 (Z80A)
2427U2     Video chip with heatsink stuck on top, possibly TMS9928
2528U3     SN76489AN
r19771r19772
5558but is banked out of view of a BASIC program.
5659
5760
61KNOWN CARTS
62SD-BASIC V1.0
63SD-BASIC V2.0
64
65
66ToDo:
67- Keyboard
68- Printer (out 00)
69- Cassette
70- Joysticks
71- Colours are different to the real system
72- RAM banking
73- Cart slot
74- Size of vram
75- When BASIC starts the intro is off the top of the screen
76
5877****************************************************************************/
5978
6079#include "emu.h"
6180#include "cpu/z80/z80.h"
6281#include "video/tms9928a.h"
82#include "sound/sn76496.h"
6383//#include "imagedev/cartslot.h"
6484//#include "imagedev/cassette.h"
85//#include "sound/wave.h"
6586
6687
6788class pencil2_state : public driver_device
r19771r19772
7394   { }
7495
7596   required_device<cpu_device> m_maincpu;
76   DECLARE_READ8_MEMBER(port00_r) { return 0x80; };
77   DECLARE_READ8_MEMBER(port0f_r) { return 0x05; };
97   //DECLARE_READ8_MEMBER(port00_r) { return 0x80; };
98   //DECLARE_READ8_MEMBER(port0f_r) { return 0x05; };
7899   virtual void machine_reset();
79100};
80101
r19771r19772
88109static ADDRESS_MAP_START(pencil2_io, AS_IO, 8, pencil2_state)
89110   //ADDRESS_MAP_UNMAP_HIGH
90111   ADDRESS_MAP_GLOBAL_MASK(0xff)
91   AM_RANGE(0x00, 0x00) AM_READ(port00_r)
92   AM_RANGE(0x0f, 0x0f) AM_READ(port0f_r)
93   AM_RANGE(0x20, 0x20) AM_WRITENOP
112   //AM_RANGE(0x00, 0x00) AM_READ(port00_r)
113   //AM_RANGE(0x0f, 0x0f) AM_READ(port0f_r)
114   //AM_RANGE(0x20, 0x20) AM_WRITENOP
115   AM_RANGE(0xbe, 0xbe) AM_DEVREADWRITE("tms9928a", tms9928a_device, vram_read, vram_write)
116   AM_RANGE(0xbf, 0xbf) AM_DEVREADWRITE("tms9928a", tms9928a_device, register_read, register_write)
117   AM_RANGE(0xe0, 0xff) AM_DEVWRITE("sn76489a", sn76489a_device, write)
94118ADDRESS_MAP_END
95119
96120
r19771r19772
103127{
104128}
105129
106static TMS9928A_INTERFACE(pencil2_tms9928a_interface)
130static const sn76496_config psg_intf =
107131{
108   "screen",
109   0x4000,
110132   DEVCB_NULL
111133};
112134
135static TMS9928A_INTERFACE(pencil2_tms9928a_interface)
136{
137   "screen",   // screen tag
138   0x4000,      // vram size (guess)
139   DEVCB_NULL   // write line if int changes
140};
141
113142static MACHINE_CONFIG_START( pencil2, pencil2_state )
114143   /* basic machine hardware */
115   MCFG_CPU_ADD("maincpu", Z80, 10738000/3)
144   MCFG_CPU_ADD("maincpu", Z80, XTAL_10_738635MHz/3)
116145   MCFG_CPU_PROGRAM_MAP(pencil2_mem)
117146   MCFG_CPU_IO_MAP(pencil2_io)
118147
r19771r19772
121150   MCFG_TMS9928A_SCREEN_ADD_PAL( "screen" )
122151   MCFG_SCREEN_UPDATE_DEVICE( "tms9928a", tms9928a_device, screen_update )
123152
153   // sound hardware
154   MCFG_SPEAKER_STANDARD_MONO("mono")
155   MCFG_SOUND_ADD("sn76489a", SN76489A, XTAL_10_738635MHz/3) // guess
156   MCFG_SOUND_CONFIG(psg_intf)
157   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
158//   MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG)
159//   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
160
161   /* cassette */
162//   MCFG_CASSETTE_ADD( CASSETTE_TAG, pencil2_cassette_interface )
163
164   /* cartridge */
165//   MCFG_CARTSLOT_ADD("cart")
166//   MCFG_CARTSLOT_EXTENSION_LIST("rom")
167//   MCFG_CARTSLOT_NOT_MANDATORY
168//   MCFG_CARTSLOT_LOAD(pencil2_cart)
169//   MCFG_CARTSLOT_INTERFACE("pencil2_cart")
124170MACHINE_CONFIG_END
125171
126172/* ROM definition */
r19771r19772
131177   ROM_RELOAD(        0xb000, 0x1000 )
132178   ROM_LOAD( "203",   0x8000, 0x2000, CRC(f502175c) SHA1(cb2190e633e98586758008577265a7a2bc088233) )
133179   ROM_LOAD( "202",   0xc000, 0x2000, CRC(5171097d) SHA1(171999bc04dc98c74c0722b2866310d193dc0f82) )
180//   ROM_CART_LOAD("cart", 0x8000, 0x8000, ROM_OPTIONAL)
134181ROM_END
135182
136183/* Driver */

Previous 199869 Revisions Next


© 1997-2024 The MAME Team