trunk/src/mess/drivers/gamate.c
| r242871 | r242872 | |
| 11 | 11 | #include "bus/generic/carts.h" |
| 12 | 12 | #include "rendlay.h" |
| 13 | 13 | |
| 14 | //#define USE_GFX |
| 15 | |
| 14 | 16 | class gamate_state : public driver_device |
| 15 | 17 | { |
| 16 | 18 | public: |
| r242871 | r242872 | |
| 18 | 20 | : driver_device(mconfig, type, tag) |
| 19 | 21 | , m_maincpu(*this, "maincpu") |
| 20 | 22 | , m_cart(*this, "cartslot") |
| 21 | | // , m_gfxdecode(*this, "gfxdecode") |
| 23 | #ifdef USE_GFX |
| 24 | , m_gfxdecode(*this, "gfxdecode") |
| 25 | #endif |
| 22 | 26 | , m_io_joy(*this, "JOY") |
| 23 | 27 | , m_palette(*this, "palette") |
| 24 | 28 | , m_bios(*this, "bios") |
| r242871 | r242872 | |
| 26 | 30 | |
| 27 | 31 | DECLARE_PALETTE_INIT(gamate); |
| 28 | 32 | DECLARE_READ8_MEMBER(protection_r); |
| 33 | DECLARE_READ8_MEMBER(newer_protection_set); |
| 34 | DECLARE_WRITE8_MEMBER(protection_reset); |
| 29 | 35 | DECLARE_READ8_MEMBER(gamate_cart_protection_r); |
| 30 | 36 | DECLARE_WRITE8_MEMBER(gamate_cart_protection_w); |
| 31 | 37 | DECLARE_WRITE8_MEMBER(cart_bankswitchmulti_w); |
| r242871 | r242872 | |
| 47 | 53 | |
| 48 | 54 | struct |
| 49 | 55 | { |
| 50 | | UINT8 reg[8]; |
| 51 | | struct { |
| 52 | | bool write; |
| 53 | | bool page2; // else page1 |
| 56 | UINT8 reg[8]; |
| 57 | struct { |
| 58 | bool write; |
| 59 | bool page2; // else page1 |
| 54 | 60 | UINT8 ypos, xpos/*tennis*/; |
| 55 | | UINT8 data[2][0x100][0x20]; |
| 56 | | } bitmap; |
| 57 | | UINT8 x, y; |
| 61 | UINT8 data[2][0x100][0x20]; |
| 62 | } bitmap; |
| 63 | UINT8 x, y; |
| 58 | 64 | bool y_increment; |
| 59 | 65 | } video; |
| 60 | 66 | |
| 61 | 67 | struct { |
| 68 | bool set; |
| 62 | 69 | int bit_shifter; |
| 63 | 70 | UINT8 cartridge_byte; |
| 64 | 71 | UINT16 address; // in reality something more like short local cartridge address offset |
| 65 | 72 | bool unprotected; |
| 66 | 73 | bool failed; |
| 74 | |
| 67 | 75 | } card_protection; |
| 68 | 76 | |
| 69 | 77 | required_device<cpu_device> m_maincpu; |
| 70 | 78 | required_device<generic_slot_device> m_cart; |
| 71 | | // required_device<gfxdecode_device> m_gfxdecode; |
| 79 | #ifdef USE_GFX |
| 80 | required_device<gfxdecode_device> m_gfxdecode; |
| 81 | #endif |
| 72 | 82 | required_ioport m_io_joy; |
| 73 | 83 | required_device<palette_device> m_palette; |
| 74 | 84 | required_shared_ptr<UINT8> m_bios; |
| 75 | 85 | emu_timer *timer1; |
| 76 | 86 | emu_timer *timer2; |
| 87 | UINT8 bank_multi; |
| 77 | 88 | }; |
| 78 | 89 | |
| 79 | 90 | WRITE8_MEMBER( gamate_state::gamate_cart_protection_w ) |
| 80 | 91 | { |
| 92 | logerror("%.6f protection write %x %x address:%x data:%x shift:%d\n",machine().time().as_double(), offset, data, card_protection.address, card_protection.cartridge_byte, card_protection.bit_shifter); |
| 93 | |
| 81 | 94 | switch (offset) { |
| 82 | 95 | case 0: |
| 83 | 96 | card_protection.failed= card_protection.failed || ((card_protection.cartridge_byte&0x80)!=0) != ((data&4)!=0); |
| r242871 | r242872 | |
| 91 | 104 | } |
| 92 | 105 | READ8_MEMBER( gamate_state::gamate_cart_protection_r ) |
| 93 | 106 | { |
| 94 | | UINT8 ret=1; |
| 95 | | switch (offset) { |
| 96 | | case 0: |
| 97 | | ret=(card_protection.cartridge_byte&0x80)?2:0; |
| 98 | | card_protection.cartridge_byte<<=1; |
| 99 | | card_protection.bit_shifter++; |
| 100 | | if (card_protection.bit_shifter>=8) { |
| 101 | | card_protection.bit_shifter=0; |
| 102 | | card_protection.cartridge_byte=m_cart->get_rom_base()[card_protection.address++]; |
| 103 | | card_protection.unprotected=true; |
| 104 | | if (!card_protection.failed) { |
| 105 | | } // now protection chip on cartridge activates cartridge chip select on cpu accesses |
| 106 | | } |
| 107 | | break; |
| 107 | |
| 108 | UINT8 ret=1; |
| 109 | if (card_protection.bit_shifter==7 && card_protection.unprotected) { |
| 110 | ret=m_cart->get_rom_base()[bank_multi*0x4000]; |
| 111 | } else { |
| 112 | card_protection.bit_shifter++; |
| 113 | if (card_protection.bit_shifter==8) { |
| 114 | card_protection.bit_shifter=0; |
| 115 | card_protection.cartridge_byte='G'; |
| 116 | card_protection.unprotected=true; |
| 108 | 117 | } |
| 109 | | return ret; |
| 118 | ret=(card_protection.cartridge_byte&0x80)?2:0; |
| 119 | if (card_protection.bit_shifter==7 && !card_protection.failed) { // now protection chip on cartridge activates cartridge chip select on cpu accesses |
| 120 | // m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r)); // next time I will try to get this working |
| 121 | } |
| 122 | card_protection.cartridge_byte<<=1; |
| 123 | } |
| 124 | logerror("%.6f protection read %x %x address:%x data:%x shift:%d\n",machine().time().as_double(), offset, ret, card_protection.address, card_protection.cartridge_byte, card_protection.bit_shifter); |
| 125 | return ret; |
| 110 | 126 | } |
| 111 | 127 | |
| 112 | | READ8_MEMBER( gamate_state::protection_r ) { return 1; } |
| 128 | READ8_MEMBER( gamate_state::protection_r ) { return card_protection.set? 3: 1; } // bits 0 and 1 checked |
| 113 | 129 | |
| 130 | WRITE8_MEMBER( gamate_state::protection_reset ) |
| 131 | { |
| 132 | // writes 0x20 |
| 133 | card_protection.address=0x6005-0x6001; |
| 134 | card_protection.bit_shifter=0; |
| 135 | card_protection.cartridge_byte=m_cart->get_rom_base()[card_protection.address++];//m_cart_rom[card_protection.address++]; |
| 136 | card_protection.failed=false; |
| 137 | card_protection.unprotected=false; |
| 138 | } |
| 139 | |
| 140 | READ8_MEMBER( gamate_state::newer_protection_set ) |
| 141 | { |
| 142 | card_protection.set=true; |
| 143 | return 0; |
| 144 | } |
| 145 | |
| 146 | |
| 114 | 147 | WRITE8_MEMBER( gamate_state::gamate_video_w ) |
| 115 | 148 | { |
| 116 | | video.reg[offset]=data; |
| 117 | | switch (offset) { |
| 118 | | case 1: video.bitmap.write=data&0xc0; // more addressing mode |
| 149 | video.reg[offset]=data; |
| 150 | switch (offset) { |
| 151 | case 1: video.bitmap.write=data&0xc0; // more addressing mode |
| 119 | 152 | video.y_increment=data&0x40; |
| 120 | 153 | break; |
| 121 | 154 | case 2: video.bitmap.xpos=data;break; // at least 7 bits |
| 122 | 155 | case 3: video.bitmap.ypos=data;break; // at least 7 bits |
| 123 | | case 4: video.bitmap.page2=data&0x80;video.x=data&0x7f;break; |
| 124 | | case 5: video.y=data;break; |
| 125 | | case 7: |
| 126 | | if (video.bitmap.write) { |
| 127 | | if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/) |
| 128 | | video.bitmap.data[video.bitmap.page2][video.y][video.x]=data; |
| 129 | | else |
| 130 | | logerror("%.6f %04x video bitmap x %x invalid\n",machine().time().as_double(), m_maincpu->pc(), video.x); |
| 131 | | } else { |
| 132 | | video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)]=data; |
| 133 | | } |
| 134 | | if (video.y_increment) video.y++; |
| 156 | case 4: video.bitmap.page2=data&0x80;video.x=data&0x7f;break; |
| 157 | case 5: video.y=data;break; |
| 158 | case 7: |
| 159 | if (video.bitmap.write) { |
| 160 | if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/) |
| 161 | video.bitmap.data[video.bitmap.page2][video.y][video.x]=data; |
| 162 | else |
| 163 | logerror("%.6f %04x video bitmap x %x invalid\n",machine().time().as_double(), m_maincpu->pc(), video.x); |
| 164 | } else { |
| 165 | video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)]=data; |
| 166 | } |
| 167 | if (video.y_increment) video.y++; |
| 135 | 168 | else video.x++; |
| 136 | | } |
| 169 | } |
| 137 | 170 | } |
| 138 | 171 | |
| 139 | 172 | WRITE8_MEMBER( gamate_state::cart_bankswitchmulti_w ) |
| 140 | 173 | { |
| 141 | | membank("bankmulti")->set_base(m_cart->get_rom_base()+0x4000*data); |
| 174 | bank_multi=data; |
| 175 | membank("bankmulti")->set_base(m_cart->get_rom_base()+0x4000*data+1); |
| 142 | 176 | } |
| 143 | 177 | |
| 144 | 178 | WRITE8_MEMBER( gamate_state::cart_bankswitch_w ) |
| r242871 | r242872 | |
| 149 | 183 | READ8_MEMBER( gamate_state::gamate_video_r ) |
| 150 | 184 | { |
| 151 | 185 | if (offset!=6) return 0; |
| 152 | | UINT8 data=0; |
| 153 | | if (video.bitmap.write) { |
| 154 | | if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/) |
| 155 | | data=video.bitmap.data[video.bitmap.page2][video.y][video.x]; |
| 156 | | else |
| 157 | | logerror("%.6f video bitmap x %x invalid\n",machine().time().as_double(),video.x); |
| 158 | | } else { |
| 159 | | data=video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)]; |
| 160 | | } |
| 161 | | if (m_maincpu->pc()<0xf000) |
| 162 | | logerror("%.6f video read %04x %02x\n",machine().time().as_double(),offset, data); |
| 163 | | return data; |
| 186 | UINT8 data=0; |
| 187 | if (video.bitmap.write) { |
| 188 | if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/) |
| 189 | data=video.bitmap.data[video.bitmap.page2][video.y][video.x]; |
| 190 | else |
| 191 | logerror("%.6f video bitmap x %x invalid\n",machine().time().as_double(),video.x); |
| 192 | } else { |
| 193 | data=video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)]; |
| 194 | } |
| 195 | if (m_maincpu->pc()<0xf000) |
| 196 | logerror("%.6f video read %04x %02x\n",machine().time().as_double(),offset, data); |
| 197 | return data; |
| 164 | 198 | } |
| 165 | 199 | |
| 166 | 200 | WRITE8_MEMBER( gamate_state::gamate_audio_w ) |
| 167 | 201 | { |
| 168 | | logerror("%.6f %04x audio write %04x %02x\n",machine().time().as_double(),m_maincpu->pc(),offset,data); |
| 202 | logerror("%.6f %04x audio write %04x %02x\n",machine().time().as_double(),m_maincpu->pc(),offset,data); |
| 169 | 203 | } |
| 170 | 204 | |
| 171 | 205 | READ8_MEMBER( gamate_state::gamate_audio_r ) |
| 172 | 206 | { |
| 173 | | logerror("%.6f %04x audio read %04x \n",machine().time().as_double(),m_maincpu->pc(),offset); |
| 207 | logerror("%.6f %04x audio read %04x \n",machine().time().as_double(),m_maincpu->pc(),offset); |
| 174 | 208 | return 0; |
| 175 | 209 | } |
| 176 | 210 | |
| 177 | 211 | |
| 178 | 212 | READ8_MEMBER( gamate_state::gamate_pad_r ) |
| 179 | 213 | { |
| 180 | | UINT8 data=m_io_joy->read(); |
| 181 | | return data; |
| 214 | UINT8 data=m_io_joy->read(); |
| 215 | return data; |
| 182 | 216 | } |
| 183 | 217 | |
| 184 | 218 | static ADDRESS_MAP_START( gamate_mem, AS_PROGRAM, 8, gamate_state ) |
| 185 | | AM_RANGE(0x0000, 0x03ff) AM_RAM |
| 186 | | AM_RANGE(0x4000, 0x400d) AM_READWRITE(gamate_audio_r, gamate_audio_w) |
| 187 | | AM_RANGE(0x4400, 0x4400) AM_READ(gamate_pad_r) |
| 188 | | AM_RANGE(0x5000, 0x5007) AM_READWRITE(gamate_video_r, gamate_video_w) |
| 189 | | AM_RANGE(0x5a00, 0x5a00) AM_READ(protection_r) |
| 219 | AM_RANGE(0x0000, 0x03ff) AM_RAM |
| 220 | AM_RANGE(0x4000, 0x400d) AM_READWRITE(gamate_audio_r, gamate_audio_w) |
| 221 | AM_RANGE(0x4400, 0x4400) AM_READ(gamate_pad_r) |
| 222 | AM_RANGE(0x5000, 0x5007) AM_READWRITE(gamate_video_r, gamate_video_w) |
| 223 | AM_RANGE(0x5800, 0x5800) AM_READ(newer_protection_set) |
| 224 | AM_RANGE(0x5900, 0x5900) AM_WRITE(protection_reset) |
| 225 | AM_RANGE(0x5a00, 0x5a00) AM_READ(protection_r) |
| 190 | 226 | |
| 191 | | AM_RANGE(0x6000, 0x9fff) AM_READ_BANK("bankmulti") |
| 192 | | AM_RANGE(0xa000, 0xdfff) AM_READ_BANK("bank") |
| 227 | AM_RANGE(0x6001, 0x9fff) AM_READ_BANK("bankmulti") |
| 228 | AM_RANGE(0xa000, 0xdfff) AM_READ_BANK("bank") |
| 193 | 229 | |
| 194 | | AM_RANGE(0x6000, 0x6002) AM_READWRITE(gamate_cart_protection_r, gamate_cart_protection_w) |
| 195 | | // AM_RANGE(0x6000, 0xdfff) AM_READWRITE(gamate_cart_r, gamate_cart_w) |
| 230 | AM_RANGE(0x6000, 0x6000) AM_READWRITE(gamate_cart_protection_r, gamate_cart_protection_w) |
| 196 | 231 | AM_RANGE(0x8000, 0x8000) AM_WRITE(cart_bankswitchmulti_w) |
| 197 | 232 | AM_RANGE(0xc000, 0xc000) AM_WRITE(cart_bankswitch_w) |
| 198 | 233 | |
| 199 | | AM_RANGE(0xf000, 0xffff) AM_ROM AM_SHARE("bios") |
| 234 | AM_RANGE(0xf000, 0xffff) AM_ROM AM_SHARE("bios") |
| 200 | 235 | ADDRESS_MAP_END |
| 201 | 236 | |
| 202 | 237 | |
| r242871 | r242872 | |
| 212 | 247 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SELECT) PORT_NAME("Select") |
| 213 | 248 | INPUT_PORTS_END |
| 214 | 249 | |
| 215 | | #ifdef UNUSED_CODE |
| 250 | #ifdef USE_GFX |
| 216 | 251 | static const struct gfx_layout gamate_charlayout = |
| 217 | 252 | { |
| 218 | | 4, /* width of object */ |
| 219 | | 1, /* height of object */ |
| 220 | | 256,/* 256 characters */ |
| 221 | | 2, /* bits per pixel */ |
| 222 | | { 0,1 }, /* no bitplanes */ |
| 223 | | /* x offsets */ |
| 224 | | { 0,2,4,6 }, |
| 225 | | /* y offsets */ |
| 226 | | { 0 }, |
| 227 | | 8*1 /* size of 1 object in bits */ |
| 253 | 4, /* width of object */ |
| 254 | 1, /* height of object */ |
| 255 | 256,/* 256 characters */ |
| 256 | 2, /* bits per pixel */ |
| 257 | { 0,4 }, /* no bitplanes */ |
| 258 | /* x offsets */ |
| 259 | { 0,1,2,3 }, |
| 260 | /* y offsets */ |
| 261 | { 0 }, |
| 262 | 8*1 /* size of 1 object in bits */ |
| 228 | 263 | }; |
| 229 | 264 | |
| 265 | static GFXDECODE_START( gamate ) |
| 266 | GFXDECODE_ENTRY( "gfx1", 0x0000, gamate_charlayout, 0, 0x100 ) |
| 267 | GFXDECODE_END |
| 268 | #endif |
| 269 | |
| 230 | 270 | static const unsigned short gamate_palette[4] = |
| 231 | 271 | { |
| 232 | 272 | 0,1,2,3 |
| 233 | 273 | }; |
| 234 | 274 | |
| 235 | | static GFXDECODE_START( gamate_charlayout ) |
| 236 | | GFXDECODE_ENTRY( "gfx1", 0x0000, gamate_charlayout, 0, 0x100 ) |
| 237 | | GFXDECODE_END |
| 238 | | #endif |
| 239 | 275 | |
| 240 | 276 | /* palette in red, green, blue tribles */ |
| 241 | 277 | static const unsigned char gamate_colors[4][3] = |
| 242 | 278 | { |
| 243 | | { 255,255,255 }, |
| 244 | | { 0xa0, 0xa0, 0xa0 }, |
| 245 | | { 0x60, 0x60, 0x60 }, |
| 246 | | { 0, 0, 0 } |
| 279 | { 255,255,255 }, |
| 280 | { 0xa0, 0xa0, 0xa0 }, |
| 281 | { 0x60, 0x60, 0x60 }, |
| 282 | { 0, 0, 0 } |
| 247 | 283 | }; |
| 248 | 284 | |
| 249 | 285 | PALETTE_INIT_MEMBER(gamate_state, gamate) |
| r242871 | r242872 | |
| 254 | 290 | { |
| 255 | 291 | palette.set_pen_color(i, gamate_colors[i][0], gamate_colors[i][1], gamate_colors[i][2]); |
| 256 | 292 | } |
| 257 | | #if 0 |
| 258 | | for (int i = 0; i < 8; i++) |
| 259 | | palette.set_indirect_color(i, arcadia_colors[i]); |
| 260 | | |
| 261 | | for (int i = 0; i < 128+8; i++) |
| 262 | | palette.set_pen_indirect(i, arcadia_palette[i]); |
| 263 | | #endif |
| 264 | 293 | } |
| 265 | 294 | |
| 266 | | |
| 295 | #ifndef USE_GFX |
| 267 | 296 | static void BlitPlane(UINT16* line, UINT8 plane1, UINT8 plane2) |
| 268 | 297 | { |
| 269 | 298 | line[3]=(plane1&1)|((plane2<<1)&2); |
| r242871 | r242872 | |
| 271 | 300 | line[1]=((plane1>>2)&1)|((plane2>>1)&2); |
| 272 | 301 | line[0]=((plane1>>3)&1)|((plane2>>2)&2); |
| 273 | 302 | } |
| 303 | #endif |
| 274 | 304 | |
| 275 | 305 | UINT32 gamate_state::screen_update_gamate(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 276 | 306 | { |
| 277 | | int x, y, j; |
| 278 | | for (y=0;y<152;y++) { |
| 279 | | for (x=-(video.bitmap.xpos&7), j=0;x<160;x+=8, j++) { |
| 280 | | UINT8 d1=video.bitmap.data[0][(y+video.bitmap.ypos)&0xff][(j+video.bitmap.xpos/8)&0x1f]; |
| 281 | | UINT8 d2=video.bitmap.data[1][(y+video.bitmap.ypos)&0xff][(j+video.bitmap.xpos/8)&0x1f]; |
| 282 | | BlitPlane(&bitmap.pix16(y, x+4), d1, d2); |
| 283 | | BlitPlane(&bitmap.pix16(y, x), d1>>4, d2>>4); |
| 284 | | } |
| 285 | | } |
| 286 | | return 0; |
| 307 | int x, y, j; |
| 308 | for (y=0;y<152;y++) { |
| 309 | for (x=-(video.bitmap.xpos&7), j=0;x<160;x+=8, j++) { |
| 310 | UINT8 d1=video.bitmap.data[0][(y+video.bitmap.ypos)&0xff][(j+video.bitmap.xpos/8)&0x1f]; |
| 311 | UINT8 d2=video.bitmap.data[1][(y+video.bitmap.ypos)&0xff][(j+video.bitmap.xpos/8)&0x1f]; |
| 312 | #ifdef USE_GFX |
| 313 | m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, (d1&0xf)|((d2&0xf)<<4), 0,0,0,x+4,y); |
| 314 | m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, (d1>>4)|(d2&0xf0),0,0,0,x,y); |
| 315 | #else |
| 316 | BlitPlane(&bitmap.pix16(y, x+4), d1, d2); |
| 317 | BlitPlane(&bitmap.pix16(y, x), d1>>4, d2>>4); |
| 318 | #endif |
| 319 | } |
| 320 | } |
| 321 | return 0; |
| 287 | 322 | } |
| 288 | 323 | |
| 289 | 324 | DRIVER_INIT_MEMBER(gamate_state,gamate) |
| 290 | 325 | { |
| 291 | 326 | memset(&video, 0, sizeof(video));/* memset(m_ram, 0, sizeof(m_ram));*/ |
| 292 | | UINT8 *gfx=memregion("gfx1")->base(); for (int i=0; i<256; i++) gfx[i]=i; |
| 327 | #ifdef USE_GFX |
| 328 | UINT8 *gfx=memregion("gfx1")->base(); |
| 329 | for (int i=0; i<256; i++) gfx[i]=i; |
| 330 | #endif |
| 293 | 331 | timer1 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gamate_state::gamate_timer),this)); |
| 294 | 332 | timer2 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gamate_state::gamate_timer2),this)); |
| 295 | 333 | } |
| r242871 | r242872 | |
| 298 | 336 | void gamate_state::machine_start() |
| 299 | 337 | { |
| 300 | 338 | if (m_cart->exists()) { |
| 301 | | // m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r)); |
| 302 | | membank("bankmulti")->set_base(m_cart->get_rom_base()); |
| 339 | // m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r)); |
| 340 | membank("bankmulti")->set_base(m_cart->get_rom_base()+1); |
| 303 | 341 | membank("bank")->set_base(m_cart->get_rom_base()+0x4000); // bankswitched games in reality no offset |
| 304 | 342 | } |
| 305 | | m_bios[0xdf1]=0xea; m_bios[0xdf2]=0xea; // $47 protection readback |
| 306 | | card_protection.address=0x6005-0x6001; |
| 307 | | card_protection.bit_shifter=0; |
| 308 | | card_protection.cartridge_byte=m_cart->get_rom_base()[card_protection.address++];//m_cart_rom[card_protection.address++]; |
| 309 | | card_protection.failed=false; |
| 343 | // m_bios[0xdf1]=0xea; m_bios[0xdf2]=0xea; // default bios: $47 protection readback |
| 344 | card_protection.set=false; |
| 345 | bank_multi=0; |
| 310 | 346 | card_protection.unprotected=false; |
| 311 | 347 | timer2->enable(TRUE); |
| 312 | 348 | timer2->reset(m_maincpu->cycles_to_attotime(1000)); |
| r242871 | r242872 | |
| 355 | 391 | MCFG_SCREEN_UPDATE_DRIVER(gamate_state, screen_update_gamate) |
| 356 | 392 | MCFG_SCREEN_PALETTE("palette") |
| 357 | 393 | |
| 358 | | // MCFG_GFXDECODE_ADD("gfxdecode", "palette", gamate ) |
| 394 | #ifdef USE_GFX |
| 395 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", gamate ) |
| 396 | #endif |
| 359 | 397 | MCFG_PALETTE_ADD("palette", ARRAY_LENGTH(gamate_colors)) |
| 360 | | // MCFG_PALETTE_INDIRECT_ENTRIES(4) |
| 361 | 398 | MCFG_PALETTE_INIT_OWNER(gamate_state, gamate) |
| 362 | 399 | MCFG_DEFAULT_LAYOUT(layout_lcd) |
| 363 | 400 | |
| r242871 | r242872 | |
| 370 | 407 | |
| 371 | 408 | ROM_START(gamate) |
| 372 | 409 | ROM_REGION(0x10000,"maincpu", 0) |
| 373 | | ROM_LOAD("gamate_bios_umc.bin", 0xf000, 0x1000, CRC(07090415) SHA1(ea449dc607601f9a68d855ad6ab53800d2e99297) ) |
| 410 | ROM_SYSTEM_BIOS(0, "default", "DEFAULT") |
| 411 | ROMX_LOAD("gamate_bios_umc.bin", 0xf000, 0x1000, CRC(07090415) SHA1(ea449dc607601f9a68d855ad6ab53800d2e99297), ROM_BIOS(1) ) |
| 412 | ROM_SYSTEM_BIOS(1, "newer", "NEWER") |
| 413 | ROMX_LOAD("gamate_bios_9130__unknown__bit_icasc00001_9130-bs_r32261.bin", 0xf000, 0x1000, CRC(03a5f3a7) SHA1(4e9dfbfe916ca485530ef4221593ab68738e2217), ROM_BIOS(2) ) |
| 414 | #ifdef USE_GFX |
| 374 | 415 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 416 | #endif |
| 375 | 417 | ROM_END |
| 376 | 418 | |
| 377 | 419 | |
| 378 | 420 | /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */ |
| 379 | 421 | CONS( 19??, gamate, 0, 0, gamate, gamate, gamate_state, gamate, "Bit Corp", "Gamate", GAME_NO_SOUND) |
| 422 | |
| 423 | |