Previous 199869 Revisions Next

r23944 Tuesday 25th June, 2013 at 16:24:21 UTC by Angelo Salese
Some messages printed on serial port
[src/mess/drivers]harriet.c

trunk/src/mess/drivers/harriet.c
r23943r23944
22
33   Harriet (c) 1990 Quadtel
44
5   TODO:
6   - PCB pics would be very useful
7   - "Failed to read NVR" message.
8   - hook-up keyboard/terminal, shouldn't be too hard by studying the code.
59
6
710***************************************************************************/
811
912
r23943r23944
1114#include "cpu/m68000/m68000.h"
1215//#include "sound/ay8910.h"
1316
14#define MAIN_CLOCK XTAL_8MHz
15
1617class harriet_state : public driver_device
1718{
1819public:
r23943r23944
2728   // screen updates
2829   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
2930
31   DECLARE_READ8_MEMBER(unk_r);
32   DECLARE_WRITE8_MEMBER(unk_w);
33   DECLARE_WRITE8_MEMBER(serial_w);
34   DECLARE_READ8_MEMBER(unk2_r);
35   DECLARE_READ8_MEMBER(unk3_r);
36   DECLARE_READ8_MEMBER(unk4_r);
37
3038protected:
3139   // driver_device overrides
3240   virtual void machine_start();
r23943r23944
4553   return 0;
4654}
4755
56/* tested at POST (PC=0x612), halts the CPU if cmp.b $f1000f.l, d0 for 0x4000 DBRAs */
57READ8_MEMBER(harriet_state::unk_r)
58{
59   return machine().rand();
60}
61
62WRITE8_MEMBER(harriet_state::unk_w)
63{
64/*   if(offset)
65      printf("%02x\n",data);
66   else if(data != 0xcf)
67      printf("$f1001d Control (offset 0) write %02x\n",data);*/
68}
69
70/* PC=0x676/0x694 */
71READ8_MEMBER(harriet_state::unk2_r)
72{
73   return machine().rand();
74}
75
76
77WRITE8_MEMBER(harriet_state::serial_w)
78{
79   printf("%c",data);
80}
81
82/* tested before putting data to serial port at PC=0x4c78 */
83READ8_MEMBER(harriet_state::unk3_r)
84{
85   return 0xff;//machine().rand();
86}
87
88/* 0x314c, terminal status? */
89READ8_MEMBER(harriet_state::unk4_r)
90{
91   return 0;//machine().rand();
92}
93
4894static ADDRESS_MAP_START( harriet_map, AS_PROGRAM, 16, harriet_state )
4995   AM_RANGE(0x000000, 0x007fff) AM_ROM
96   AM_RANGE(0x040000, 0x040fff) AM_RAM // NVRAM
97   AM_RANGE(0x7f0000, 0x7fffff) AM_RAM // todo: boundaries, 0x7fe000 - 0x7fffff tested on boot
98   AM_RANGE(0xf1000e, 0xf1000f) AM_READ8(unk_r,0x00ff)
99   AM_RANGE(0xf1001c, 0xf1001f) AM_WRITE8(unk_w,0x00ff)
100   AM_RANGE(0xf20022, 0xf20023) AM_READ8(unk2_r,0x00ff)
101   AM_RANGE(0xf20024, 0xf20025) AM_READ8(unk2_r,0x00ff)
102   AM_RANGE(0xf2002c, 0xf2002d) AM_READ8(unk3_r,0x00ff)
103   AM_RANGE(0xf2002e, 0xf2002f) AM_WRITE8(serial_w,0x00ff)
104   AM_RANGE(0xf4003e, 0xf4003f) AM_READ8(unk4_r,0x00ff)
105//   AM_RANGE(0xf4002e, 0xf4002f) AM_READ8(unk4_r,0x00ff)
106//   AM_RANGE(0xf4003e, 0xf4003f) AM_READ8(unk4_r,0x00ff)
50107ADDRESS_MAP_END
51108
52109static INPUT_PORTS_START( harriet )
r23943r23944
105162   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
106163INPUT_PORTS_END
107164
108static const gfx_layout charlayout =
109{
110   8,8,
111   RGN_FRAC(1,1),
112   1,
113   { RGN_FRAC(0,1) },
114   { 0, 1, 2, 3, 4, 5, 6, 7 },
115   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
116   8*8
117};
118165
119static GFXDECODE_START( harriet )
120   GFXDECODE_ENTRY( "maincpu", 0, charlayout,     0, 1 )
121GFXDECODE_END
122
123
124166void harriet_state::machine_start()
125167{
126168}
r23943r23944
137179static MACHINE_CONFIG_START( harriet, harriet_state )
138180
139181   /* basic machine hardware */
140   MCFG_CPU_ADD("maincpu",M68010,MAIN_CLOCK) // TODO
182   MCFG_CPU_ADD("maincpu",M68010,XTAL_8MHz) // TODO: clock
141183   MCFG_CPU_PROGRAM_MAP(harriet_map)
142184
143185   /* video hardware */
r23943r23944
148190   MCFG_SCREEN_SIZE(32*8, 32*8)
149191   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
150192
151   MCFG_GFXDECODE(harriet)
152
153193   MCFG_PALETTE_LENGTH(8)
154194
155195   /* sound hardware */
r23943r23944
166206***************************************************************************/
167207
168208ROM_START( harriet )
169   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
209   ROM_REGION( 0x8000, "maincpu", ROMREGION_ERASE00 )
170210   ROM_LOAD16_BYTE( "harriet 36-74c.tfb v5.01 lobyte 533f.bin", 0x0001, 0x4000, CRC(f07fff76) SHA1(8288f7eaa8f4155e0e4746635f63ca2cc3da25d1) )
171211   ROM_LOAD16_BYTE( "harriet 36-74c.tdb v5.01 hibyte 2a0c.bin", 0x0000, 0x4000, CRC(a61f441d) SHA1(76af6eddd5c042f1b2eef590eb822379944b9b28) )
172212ROM_END

Previous 199869 Revisions Next


© 1997-2024 The MAME Team