trunk/src/mess/drivers/harriet.c
| r23943 | r23944 | |
| 2 | 2 | |
| 3 | 3 | Harriet (c) 1990 Quadtel |
| 4 | 4 | |
| 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. |
| 5 | 9 | |
| 6 | | |
| 7 | 10 | ***************************************************************************/ |
| 8 | 11 | |
| 9 | 12 | |
| r23943 | r23944 | |
| 11 | 14 | #include "cpu/m68000/m68000.h" |
| 12 | 15 | //#include "sound/ay8910.h" |
| 13 | 16 | |
| 14 | | #define MAIN_CLOCK XTAL_8MHz |
| 15 | | |
| 16 | 17 | class harriet_state : public driver_device |
| 17 | 18 | { |
| 18 | 19 | public: |
| r23943 | r23944 | |
| 27 | 28 | // screen updates |
| 28 | 29 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 29 | 30 | |
| 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 | |
| 30 | 38 | protected: |
| 31 | 39 | // driver_device overrides |
| 32 | 40 | virtual void machine_start(); |
| r23943 | r23944 | |
| 45 | 53 | return 0; |
| 46 | 54 | } |
| 47 | 55 | |
| 56 | /* tested at POST (PC=0x612), halts the CPU if cmp.b $f1000f.l, d0 for 0x4000 DBRAs */ |
| 57 | READ8_MEMBER(harriet_state::unk_r) |
| 58 | { |
| 59 | return machine().rand(); |
| 60 | } |
| 61 | |
| 62 | WRITE8_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 */ |
| 71 | READ8_MEMBER(harriet_state::unk2_r) |
| 72 | { |
| 73 | return machine().rand(); |
| 74 | } |
| 75 | |
| 76 | |
| 77 | WRITE8_MEMBER(harriet_state::serial_w) |
| 78 | { |
| 79 | printf("%c",data); |
| 80 | } |
| 81 | |
| 82 | /* tested before putting data to serial port at PC=0x4c78 */ |
| 83 | READ8_MEMBER(harriet_state::unk3_r) |
| 84 | { |
| 85 | return 0xff;//machine().rand(); |
| 86 | } |
| 87 | |
| 88 | /* 0x314c, terminal status? */ |
| 89 | READ8_MEMBER(harriet_state::unk4_r) |
| 90 | { |
| 91 | return 0;//machine().rand(); |
| 92 | } |
| 93 | |
| 48 | 94 | static ADDRESS_MAP_START( harriet_map, AS_PROGRAM, 16, harriet_state ) |
| 49 | 95 | 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) |
| 50 | 107 | ADDRESS_MAP_END |
| 51 | 108 | |
| 52 | 109 | static INPUT_PORTS_START( harriet ) |
| r23943 | r23944 | |
| 105 | 162 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 106 | 163 | INPUT_PORTS_END |
| 107 | 164 | |
| 108 | | static 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 | | }; |
| 118 | 165 | |
| 119 | | static GFXDECODE_START( harriet ) |
| 120 | | GFXDECODE_ENTRY( "maincpu", 0, charlayout, 0, 1 ) |
| 121 | | GFXDECODE_END |
| 122 | | |
| 123 | | |
| 124 | 166 | void harriet_state::machine_start() |
| 125 | 167 | { |
| 126 | 168 | } |
| r23943 | r23944 | |
| 137 | 179 | static MACHINE_CONFIG_START( harriet, harriet_state ) |
| 138 | 180 | |
| 139 | 181 | /* basic machine hardware */ |
| 140 | | MCFG_CPU_ADD("maincpu",M68010,MAIN_CLOCK) // TODO |
| 182 | MCFG_CPU_ADD("maincpu",M68010,XTAL_8MHz) // TODO: clock |
| 141 | 183 | MCFG_CPU_PROGRAM_MAP(harriet_map) |
| 142 | 184 | |
| 143 | 185 | /* video hardware */ |
| r23943 | r23944 | |
| 148 | 190 | MCFG_SCREEN_SIZE(32*8, 32*8) |
| 149 | 191 | MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) |
| 150 | 192 | |
| 151 | | MCFG_GFXDECODE(harriet) |
| 152 | | |
| 153 | 193 | MCFG_PALETTE_LENGTH(8) |
| 154 | 194 | |
| 155 | 195 | /* sound hardware */ |
| r23943 | r23944 | |
| 166 | 206 | ***************************************************************************/ |
| 167 | 207 | |
| 168 | 208 | ROM_START( harriet ) |
| 169 | | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 ) |
| 209 | ROM_REGION( 0x8000, "maincpu", ROMREGION_ERASE00 ) |
| 170 | 210 | ROM_LOAD16_BYTE( "harriet 36-74c.tfb v5.01 lobyte 533f.bin", 0x0001, 0x4000, CRC(f07fff76) SHA1(8288f7eaa8f4155e0e4746635f63ca2cc3da25d1) ) |
| 171 | 211 | ROM_LOAD16_BYTE( "harriet 36-74c.tdb v5.01 hibyte 2a0c.bin", 0x0000, 0x4000, CRC(a61f441d) SHA1(76af6eddd5c042f1b2eef590eb822379944b9b28) ) |
| 172 | 212 | ROM_END |