src/mess/drivers/pc6001.c
| r8747 | r8748 | |
| 10 | 10 | - cassette handling requires a decap of the MCU. It could be possible to |
| 11 | 11 | do some tight synch between the master CPU and a code simulation,but I think |
| 12 | 12 | it's not worth the effort... |
| 13 | | - joypad polling probably needs some kind of masking when you're on BASIC. |
| 14 | | - make the later model to work; |
| 13 | - joypad polling actually doesn't work, the joycode stuff currently hooked up is just the |
| 14 | keyboard arrow keys; |
| 15 | - make PC-6600 model to work; |
| 15 | 16 | - Currently rewriting the video part without the MC6847 for two reasons: |
| 16 | 17 | A) the later models have a custom video chip in the place of the MC6847, |
| 17 | 18 | so this implementation will be used in the end. |
| r8747 | r8748 | |
| 19 | 20 | have any docs atm. |
| 20 | 21 | |
| 21 | 22 | TODO (game specific): |
| 22 | | - The Outlaw (AX-10): is now broken due of the joycode stuff |
| 23 | | - Portpia: hangs after a bunch of text screens |
| 23 | - (several AX* games, namely Simon, Arabian Rhapsody and others): inputs doesn't work |
| 24 | - AX6 - Demo: When AY-based speech talks, screen should be a solid green (plain PC-6001) or solid white (Mk2 version) |
| 25 | - AX10 - The Outlaw: gameplay is now broken due of the joycode stuff |
| 24 | 26 | - Galaxy Mission Part I / II: can't start a play |
| 25 | | - Yakyukyo (MK2): waits for an irq, check which one; |
| 26 | | - Forts 2 (MK2): ASCII gfxs are missing; |
| 27 | | - Hydlide (MK2): pressing down makes the player to die instantly |
| 28 | | - American Truck (MK2): Screen is offset at the loading screen |
| 29 | | - Castle Excellent (MK2): copyright text drawing is quite bogus. |
| 30 | | - Pac-Man (MK2): gameplay is too fast |
| 27 | - Portopia Renzoku Satsujin Jiken: hangs after a bunch of text screens |
| 28 | (Mk2 mode 5 games) |
| 29 | - American Truck: Screen is offset at the loading screen, loading bug? |
| 30 | - Castle Excellent: copyright text drawing is quite bogus, scans text in vertical instead of horizontal? |
| 31 | - Forts 2: ASCII gfxs are missing; |
| 32 | - Hydlide: pressing down makes the player to die instantly |
| 33 | - Pac-Man: gameplay is too fast |
| 34 | - Yakyukyo: waits for an irq, check which one; |
| 31 | 35 | |
| 32 | 36 | ======================================================================================================================================================== |
| 33 | 37 | |
| r8747 | r8748 | |
| 152 | 156 | pc6001_video_ram = auto_alloc_array(machine, UINT8, 0x4000); |
| 153 | 157 | } |
| 154 | 158 | |
| 155 | | static void draw_bitmap_1bpp(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int attr) |
| 159 | /* this is known as gfx mode 4 */ |
| 160 | static void draw_gfx_mode4(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int attr) |
| 156 | 161 | { |
| 157 | 162 | int x,y,xi; |
| 158 | 163 | int fgcol,color; |
| 164 | int col_setting; |
| 165 | static const UINT8 pen_gattr[4][4] = { |
| 166 | { 0, 1, 6, 2 }, //Red / Blue |
| 167 | { 0, 6, 1, 2 }, //Blue / Red |
| 168 | { 0, 5, 2, 2 }, //Pink / Green |
| 169 | { 0, 2, 5, 2 }, //Green / Pink |
| 170 | }; |
| 171 | static const UINT8 pen_wattr[4][4] = { |
| 172 | { 0, 1, 6, 7 }, //Red / Blue |
| 173 | { 0, 6, 1, 7 }, //Blue / Red |
| 174 | { 0, 5, 2, 7 }, //Pink / Green |
| 175 | { 0, 2, 5, 7 }, //Green / Pink |
| 176 | }; |
| 177 | col_setting = input_port_read(machine,"MODE4_DSW") & 7; |
| 159 | 178 | |
| 160 | | fgcol = (attr & 2) ? 7 : 2; |
| 161 | | |
| 162 | 179 | for(y=0;y<192;y++) |
| 163 | 180 | { |
| 164 | 181 | for(x=0;x<32;x++) |
| 165 | 182 | { |
| 166 | 183 | int tile = pc6001_video_ram[(x+(y*32))+0x200]; |
| 167 | 184 | |
| 168 | | for(xi=0;xi<8;xi++) |
| 185 | if(col_setting == 0x00) //monochrome |
| 169 | 186 | { |
| 170 | | color = ((tile)>>(7-xi) & 1) ? fgcol : 0; |
| 187 | for(xi=0;xi<8;xi++) |
| 188 | { |
| 189 | fgcol = (attr & 2) ? 7 : 2; |
| 171 | 190 | |
| 172 | | *BITMAP_ADDR16(bitmap, (y+24), (x*8+xi)+32) = machine->pens[color]; |
| 191 | color = ((tile)>>(7-xi) & 1) ? fgcol : 0; |
| 192 | |
| 193 | *BITMAP_ADDR16(bitmap, (y+24), (x*8+xi)+32) = machine->pens[color]; |
| 194 | } |
| 173 | 195 | } |
| 196 | else |
| 197 | { |
| 198 | for(xi=0;xi<4;xi++) |
| 199 | { |
| 200 | fgcol = ((tile)>>(6-(xi*2)) & 3); |
| 201 | |
| 202 | color = (attr & 2) ? (pen_wattr[col_setting-1][fgcol]) : (pen_gattr[col_setting-1][fgcol]); |
| 203 | |
| 204 | *BITMAP_ADDR16(bitmap, (y+24), ((x*8+xi*2)+0)+32) = machine->pens[color]; |
| 205 | *BITMAP_ADDR16(bitmap, (y+24), ((x*8+xi*2)+1)+32) = machine->pens[color]; |
| 206 | } |
| 207 | } |
| 174 | 208 | } |
| 175 | 209 | } |
| 176 | 210 | } |
| r8747 | r8748 | |
| 309 | 343 | { |
| 310 | 344 | if(attr & 0x10) // 256x192x1 mode (FIXME: might be a different trigger) |
| 311 | 345 | { |
| 312 | | draw_bitmap_1bpp(machine,bitmap,cliprect,attr); |
| 346 | draw_gfx_mode4(machine,bitmap,cliprect,attr); |
| 313 | 347 | } |
| 314 | 348 | else // 128x192x2 mode |
| 315 | 349 | { |
| r8747 | r8748 | |
| 1146 | 1180 | |
| 1147 | 1181 | /* Input ports */ |
| 1148 | 1182 | static INPUT_PORTS_START( pc6001 ) |
| 1183 | PORT_START("MODE4_DSW") //TODO: is this really a DSW? bit arrangement is also unknown if so. |
| 1184 | PORT_DIPNAME( 0x07, 0x00, "Mode 4 GFX colors" ) |
| 1185 | PORT_DIPSETTING( 0x00, "Monochrome" ) |
| 1186 | PORT_DIPSETTING( 0x01, "Red/Blue" ) |
| 1187 | PORT_DIPSETTING( 0x02, "Blue/Red" ) |
| 1188 | PORT_DIPSETTING( 0x03, "Pink/Green" ) |
| 1189 | PORT_DIPSETTING( 0x04, "Green/Pink" ) |
| 1190 | //5-6-7 is presumably invalid |
| 1191 | |
| 1149 | 1192 | /* TODO: these two are unchecked */ |
| 1150 | 1193 | PORT_START("P1") |
| 1151 | 1194 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |