trunk/src/mess/drivers/gamate.c
| r243716 | r243717 | |
| 10 | 10 | #include "bus/generic/slot.h" |
| 11 | 11 | #include "bus/generic/carts.h" |
| 12 | 12 | #include "rendlay.h" |
| 13 | #include "includes/gamate.h" |
| 14 | #include "ui/ui.h" |
| 13 | 15 | |
| 14 | | //#define USE_GFX |
| 15 | | |
| 16 | 16 | class gamate_state : public driver_device |
| 17 | 17 | { |
| 18 | 18 | public: |
| 19 | 19 | gamate_state(const machine_config &mconfig, device_type type, const char *tag) |
| 20 | 20 | : driver_device(mconfig, type, tag) |
| 21 | 21 | , m_maincpu(*this, "maincpu") |
| 22 | , m_sound(*this, "custom") |
| 22 | 23 | , m_cart(*this, "cartslot") |
| 23 | | #ifdef USE_GFX |
| 24 | | , m_gfxdecode(*this, "gfxdecode") |
| 25 | | #endif |
| 26 | 24 | , m_io_joy(*this, "JOY") |
| 27 | 25 | , m_palette(*this, "palette") |
| 28 | 26 | , m_bios(*this, "bios") |
| r243716 | r243717 | |
| 53 | 51 | |
| 54 | 52 | struct |
| 55 | 53 | { |
| 56 | | UINT8 reg[8]; |
| 57 | | struct { |
| 58 | | bool write; |
| 59 | | bool page2; // else page1 |
| 54 | UINT8 reg[8]; |
| 55 | struct { |
| 56 | bool write; |
| 57 | bool page2; // else page1 |
| 60 | 58 | UINT8 ypos, xpos/*tennis*/; |
| 61 | | UINT8 data[2][0x100][0x20]; |
| 62 | | } bitmap; |
| 63 | | UINT8 x, y; |
| 59 | UINT8 data[2][0x100][0x20]; |
| 60 | } bitmap; |
| 61 | UINT8 x, y; |
| 64 | 62 | bool y_increment; |
| 65 | 63 | } video; |
| 66 | 64 | |
| 67 | 65 | struct { |
| 68 | | bool set; |
| 66 | bool set; |
| 69 | 67 | int bit_shifter; |
| 70 | 68 | UINT8 cartridge_byte; |
| 71 | 69 | UINT16 address; // in reality something more like short local cartridge address offset |
| 72 | 70 | bool unprotected; |
| 73 | 71 | bool failed; |
| 74 | | |
| 72 | |
| 75 | 73 | } card_protection; |
| 76 | 74 | |
| 77 | 75 | required_device<cpu_device> m_maincpu; |
| 76 | required_device<gamate_sound_device> m_sound; |
| 78 | 77 | required_device<generic_slot_device> m_cart; |
| 79 | | #ifdef USE_GFX |
| 80 | | required_device<gfxdecode_device> m_gfxdecode; |
| 81 | | #endif |
| 82 | 78 | required_ioport m_io_joy; |
| 83 | 79 | required_device<palette_device> m_palette; |
| 84 | 80 | required_shared_ptr<UINT8> m_bios; |
| 85 | 81 | emu_timer *timer1; |
| 86 | 82 | emu_timer *timer2; |
| 87 | | UINT8 bank_multi; |
| 88 | | UINT8 *m_cart_ptr; |
| 83 | UINT8 bank_multi; |
| 89 | 84 | }; |
| 90 | 85 | |
| 91 | 86 | WRITE8_MEMBER( gamate_state::gamate_cart_protection_w ) |
| 92 | 87 | { |
| 93 | | 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); |
| 94 | | |
| 88 | 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); |
| 89 | |
| 95 | 90 | switch (offset) { |
| 96 | 91 | case 0: |
| 97 | 92 | card_protection.failed= card_protection.failed || ((card_protection.cartridge_byte&0x80)!=0) != ((data&4)!=0); |
| 98 | 93 | card_protection.bit_shifter++; |
| 99 | 94 | if (card_protection.bit_shifter>=8) { |
| 100 | | card_protection.cartridge_byte=m_cart_ptr[card_protection.address++]; |
| 95 | card_protection.cartridge_byte=m_cart->get_rom_base()[card_protection.address++]; |
| 101 | 96 | card_protection.bit_shifter=0; |
| 102 | 97 | } |
| 103 | 98 | break; |
| r243716 | r243717 | |
| 107 | 102 | { |
| 108 | 103 | UINT8 ret=1; |
| 109 | 104 | if (card_protection.bit_shifter==7 && card_protection.unprotected) { |
| 110 | | ret=m_cart_ptr[bank_multi*0x4000]; |
| 105 | ret=m_cart->get_rom_base()[bank_multi*0x4000]; |
| 111 | 106 | } else { |
| 112 | 107 | card_protection.bit_shifter++; |
| 113 | 108 | if (card_protection.bit_shifter==8) { |
| r243716 | r243717 | |
| 117 | 112 | } |
| 118 | 113 | ret=(card_protection.cartridge_byte&0x80)?2:0; |
| 119 | 114 | 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 |
| 115 | // 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 | 116 | } |
| 122 | 117 | card_protection.cartridge_byte<<=1; |
| 123 | 118 | } |
| r243716 | r243717 | |
| 132 | 127 | // writes 0x20 |
| 133 | 128 | card_protection.address=0x6005-0x6001; |
| 134 | 129 | card_protection.bit_shifter=0; |
| 135 | | card_protection.cartridge_byte=m_cart_ptr[card_protection.address++];//m_cart_rom[card_protection.address++]; |
| 130 | card_protection.cartridge_byte=m_cart->get_rom_base()[card_protection.address++];//m_cart_rom[card_protection.address++]; |
| 136 | 131 | card_protection.failed=false; |
| 137 | 132 | card_protection.unprotected=false; |
| 138 | 133 | } |
| r243716 | r243717 | |
| 148 | 143 | { |
| 149 | 144 | video.reg[offset]=data; |
| 150 | 145 | switch (offset) { |
| 151 | | case 1: video.bitmap.write=data&0xc0; // more addressing mode |
| 146 | case 1: |
| 147 | if (data&0xf) printf("lcd mode %x\n", data); |
| 148 | video.bitmap.write=data&0xc0; // more addressing mode |
| 152 | 149 | video.y_increment=data&0x40; |
| 153 | 150 | break; |
| 154 | | case 2: video.bitmap.xpos=data;break; // at least 7 bits |
| 155 | | case 3: video.bitmap.ypos=data;break; // at least 7 bits |
| 151 | case 2: video.bitmap.xpos=data;break; |
| 152 | case 3: |
| 153 | if (data>=200) printf("lcd ypos: %x\n", data); |
| 154 | video.bitmap.ypos=data; |
| 155 | break; |
| 156 | 156 | case 4: video.bitmap.page2=data&0x80;video.x=data&0x7f;break; |
| 157 | 157 | case 5: video.y=data;break; |
| 158 | 158 | case 7: |
| 159 | if (video.y>=200) |
| 160 | machine().ui().popup_time(2, "bitmap write to x:%x y:%x mode:%x data:%x\n", video.x, video.y, video.reg[1], data); |
| 159 | 161 | if (video.bitmap.write) { |
| 160 | | if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/) |
| 161 | 162 | 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 | 163 | } else { |
| 165 | 164 | video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)]=data; |
| 166 | 165 | } |
| r243716 | r243717 | |
| 172 | 171 | WRITE8_MEMBER( gamate_state::cart_bankswitchmulti_w ) |
| 173 | 172 | { |
| 174 | 173 | bank_multi=data; |
| 175 | | membank("bankmulti")->set_base(m_cart_ptr+0x4000*data+1); |
| 174 | membank("bankmulti")->set_base(m_cart->get_rom_base()+0x4000*data+1); |
| 176 | 175 | } |
| 177 | 176 | |
| 178 | 177 | WRITE8_MEMBER( gamate_state::cart_bankswitch_w ) |
| 179 | 178 | { |
| 180 | | membank("bank")->set_base(m_cart_ptr+0x4000*data); |
| 179 | membank("bank")->set_base(m_cart->get_rom_base()+0x4000*data); |
| 181 | 180 | } |
| 182 | 181 | |
| 183 | 182 | READ8_MEMBER( gamate_state::gamate_video_r ) |
| 184 | 183 | { |
| 185 | | if (offset!=6) return 0; |
| 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; |
| 184 | if (offset!=6) return 0; |
| 185 | UINT8 data=0; |
| 186 | if (video.bitmap.write) { |
| 187 | data=video.bitmap.data[video.bitmap.page2][video.y][video.x]; |
| 188 | } else { |
| 189 | data=video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)]; |
| 190 | } |
| 191 | // if (m_maincpu->pc()<0xf000) |
| 192 | // machine().ui().popup_time(2, "lcd read x:%x y:%x mode:%x data:%x\n", video.x, video.y, video.reg[1], data); |
| 193 | return data; |
| 198 | 194 | } |
| 199 | 195 | |
| 200 | 196 | WRITE8_MEMBER( gamate_state::gamate_audio_w ) |
| 201 | 197 | { |
| 202 | | logerror("%.6f %04x audio write %04x %02x\n",machine().time().as_double(),m_maincpu->pc(),offset,data); |
| 198 | // printf("audio write %x:%x\n", offset, data);//logerror("%.6f %04x audio write %04x %02x\n",machine().time().as_double(),m_maincpu->pc(),offset,data); |
| 199 | m_sound->device_w(space, offset, data); |
| 203 | 200 | } |
| 204 | 201 | |
| 205 | 202 | READ8_MEMBER( gamate_state::gamate_audio_r ) |
| 206 | 203 | { |
| 207 | | logerror("%.6f %04x audio read %04x \n",machine().time().as_double(),m_maincpu->pc(),offset); |
| 208 | | return 0; |
| 204 | // legend of dragon knight |
| 205 | // machine().ui().popup_time(2, "%.6f %04x audio read %04x \n",machine().time().as_double(),m_maincpu->pc(),offset); |
| 206 | return 0; |
| 209 | 207 | } |
| 210 | 208 | |
| 211 | 209 | |
| 212 | 210 | READ8_MEMBER( gamate_state::gamate_pad_r ) |
| 213 | 211 | { |
| 214 | | UINT8 data=m_io_joy->read(); |
| 215 | | return data; |
| 212 | UINT8 data=m_io_joy->read(); |
| 213 | return data; |
| 216 | 214 | } |
| 217 | 215 | |
| 218 | 216 | static ADDRESS_MAP_START( gamate_mem, AS_PROGRAM, 8, gamate_state ) |
| 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) |
| 217 | AM_RANGE(0x0000, 0x03ff) AM_RAM |
| 218 | AM_RANGE(0x4000, 0x400d) AM_READWRITE(gamate_audio_r, gamate_audio_w) |
| 219 | AM_RANGE(0x4400, 0x4400) AM_READ(gamate_pad_r) |
| 220 | AM_RANGE(0x5000, 0x5007) AM_READWRITE(gamate_video_r, gamate_video_w) |
| 221 | AM_RANGE(0x5800, 0x5800) AM_READ(newer_protection_set) |
| 222 | AM_RANGE(0x5900, 0x5900) AM_WRITE(protection_reset) |
| 223 | AM_RANGE(0x5a00, 0x5a00) AM_READ(protection_r) |
| 226 | 224 | |
| 227 | | AM_RANGE(0x6001, 0x9fff) AM_READ_BANK("bankmulti") |
| 228 | | AM_RANGE(0xa000, 0xdfff) AM_READ_BANK("bank") |
| 225 | AM_RANGE(0x6001, 0x9fff) AM_READ_BANK("bankmulti") |
| 226 | AM_RANGE(0xa000, 0xdfff) AM_READ_BANK("bank") |
| 229 | 227 | |
| 230 | 228 | AM_RANGE(0x6000, 0x6000) AM_READWRITE(gamate_cart_protection_r, gamate_cart_protection_w) |
| 231 | 229 | AM_RANGE(0x8000, 0x8000) AM_WRITE(cart_bankswitchmulti_w) |
| 232 | 230 | AM_RANGE(0xc000, 0xc000) AM_WRITE(cart_bankswitch_w) |
| 233 | 231 | |
| 234 | | AM_RANGE(0xf000, 0xffff) AM_ROM AM_SHARE("bios") |
| 232 | AM_RANGE(0xf000, 0xffff) AM_ROM AM_SHARE("bios") |
| 235 | 233 | ADDRESS_MAP_END |
| 236 | 234 | |
| 237 | 235 | |
| r243716 | r243717 | |
| 247 | 245 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SELECT) PORT_NAME("Select") |
| 248 | 246 | INPUT_PORTS_END |
| 249 | 247 | |
| 250 | | #ifdef USE_GFX |
| 251 | | static const struct gfx_layout gamate_charlayout = |
| 248 | static const unsigned short gamate_palette[4] = |
| 252 | 249 | { |
| 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 */ |
| 250 | 0,1,2,3 |
| 263 | 251 | }; |
| 264 | 252 | |
| 265 | | static GFXDECODE_START( gamate ) |
| 266 | | GFXDECODE_ENTRY( "gfx1", 0x0000, gamate_charlayout, 0, 0x100 ) |
| 267 | | GFXDECODE_END |
| 268 | | #endif |
| 269 | 253 | |
| 270 | 254 | /* palette in red, green, blue tribles */ |
| 271 | 255 | static const unsigned char gamate_colors[4][3] = |
| 272 | 256 | { |
| 273 | | { 255,255,255 }, |
| 274 | | { 0xa0, 0xa0, 0xa0 }, |
| 275 | | { 0x60, 0x60, 0x60 }, |
| 276 | | { 0, 0, 0 } |
| 257 | { 255,255,255 }, |
| 258 | { 0xa0, 0xa0, 0xa0 }, |
| 259 | { 0x60, 0x60, 0x60 }, |
| 260 | { 0, 0, 0 } |
| 277 | 261 | }; |
| 278 | 262 | |
| 279 | 263 | PALETTE_INIT_MEMBER(gamate_state, gamate) |
| r243716 | r243717 | |
| 286 | 270 | } |
| 287 | 271 | } |
| 288 | 272 | |
| 289 | | #ifndef USE_GFX |
| 290 | 273 | static void BlitPlane(UINT16* line, UINT8 plane1, UINT8 plane2) |
| 291 | 274 | { |
| 292 | 275 | line[3]=(plane1&1)|((plane2<<1)&2); |
| r243716 | r243717 | |
| 294 | 277 | line[1]=((plane1>>2)&1)|((plane2>>1)&2); |
| 295 | 278 | line[0]=((plane1>>3)&1)|((plane2>>2)&2); |
| 296 | 279 | } |
| 297 | | #endif |
| 298 | 280 | |
| 299 | 281 | UINT32 gamate_state::screen_update_gamate(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 300 | 282 | { |
| 301 | | int x, y, j; |
| 302 | | for (y=0;y<152;y++) { |
| 303 | | for (x=-(video.bitmap.xpos&7), j=0;x<160;x+=8, j++) { |
| 304 | | UINT8 d1=video.bitmap.data[0][(y+video.bitmap.ypos)&0xff][(j+video.bitmap.xpos/8)&0x1f]; |
| 305 | | UINT8 d2=video.bitmap.data[1][(y+video.bitmap.ypos)&0xff][(j+video.bitmap.xpos/8)&0x1f]; |
| 306 | | #ifdef USE_GFX |
| 307 | | m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, (d1&0xf)|((d2&0xf)<<4), 0,0,0,x+4,y); |
| 308 | | m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, (d1>>4)|(d2&0xf0),0,0,0,x,y); |
| 309 | | #else |
| 310 | | BlitPlane(&bitmap.pix16(y, x+4), d1, d2); |
| 311 | | BlitPlane(&bitmap.pix16(y, x), d1>>4, d2>>4); |
| 312 | | #endif |
| 313 | | } |
| 314 | | } |
| 315 | | return 0; |
| 283 | int x, y, j; |
| 284 | for (y=0;y<152;y++) { |
| 285 | for (x=-(video.bitmap.xpos&7), j=0;x<160;x+=8, j++) { |
| 286 | UINT8 d1, d2; |
| 287 | if (video.bitmap.ypos<200) { |
| 288 | d1=video.bitmap.data[0][(y+video.bitmap.ypos)%200][(j+video.bitmap.xpos/8)&0x1f]; |
| 289 | d2=video.bitmap.data[1][(y+video.bitmap.ypos)%200][(j+video.bitmap.xpos/8)&0x1f]; |
| 290 | } else if ((video.bitmap.ypos&0xf)<8) { // lcdtest, of course still some registers not known, my gamate doesn't display bottom lines |
| 291 | int yi=(y+(video.bitmap.ypos&0xf)-8); |
| 292 | if (yi<0) yi=video.bitmap.ypos+y; // in this case only 2nd plane used!?, source of first plane? |
| 293 | d1=video.bitmap.data[0][yi][(j+video.bitmap.xpos/8)&0x1f]; // value of lines bevor 0 chaos |
| 294 | d2=video.bitmap.data[1][yi][(j+video.bitmap.xpos/8)&0x1f]; |
| 295 | } else { |
| 296 | d1=video.bitmap.data[0][y][(j+video.bitmap.xpos/8)&0x1f]; |
| 297 | d2=video.bitmap.data[1][y][(j+video.bitmap.xpos/8)&0x1f]; |
| 298 | } |
| 299 | BlitPlane(&bitmap.pix16(y, x+4), d1, d2); |
| 300 | BlitPlane(&bitmap.pix16(y, x), d1>>4, d2>>4); |
| 301 | } |
| 302 | } |
| 303 | return 0; |
| 316 | 304 | } |
| 317 | 305 | |
| 318 | 306 | DRIVER_INIT_MEMBER(gamate_state,gamate) |
| 319 | 307 | { |
| 320 | 308 | memset(&video, 0, sizeof(video));/* memset(m_ram, 0, sizeof(m_ram));*/ |
| 321 | | #ifdef USE_GFX |
| 322 | | UINT8 *gfx=memregion("gfx1")->base(); |
| 323 | | for (int i=0; i<256; i++) gfx[i]=i; |
| 324 | | #endif |
| 325 | 309 | timer1 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gamate_state::gamate_timer),this)); |
| 326 | 310 | timer2 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gamate_state::gamate_timer2),this)); |
| 327 | 311 | } |
| r243716 | r243717 | |
| 329 | 313 | |
| 330 | 314 | void gamate_state::machine_start() |
| 331 | 315 | { |
| 332 | | m_cart_ptr = memregion("maincpu")->base() + 0x6000; |
| 333 | 316 | if (m_cart->exists()) { |
| 334 | | // m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r)); |
| 335 | | m_cart_ptr = m_cart->get_rom_base(); |
| 317 | // m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r)); |
| 336 | 318 | membank("bankmulti")->set_base(m_cart->get_rom_base()+1); |
| 337 | 319 | membank("bank")->set_base(m_cart->get_rom_base()+0x4000); // bankswitched games in reality no offset |
| 338 | 320 | } |
| 339 | | // m_bios[0xdf1]=0xea; m_bios[0xdf2]=0xea; // default bios: $47 protection readback |
| 321 | // m_bios[0xdf1]=0xea; m_bios[0xdf2]=0xea; // default bios: $47 protection readback |
| 340 | 322 | card_protection.set=false; |
| 341 | 323 | bank_multi=0; |
| 342 | 324 | card_protection.unprotected=false; |
| r243716 | r243717 | |
| 367 | 349 | timer1->enable(TRUE); |
| 368 | 350 | timer1->reset(m_maincpu->cycles_to_attotime(10/* cycles short enought to clear irq line early enough*/)); |
| 369 | 351 | timer2->enable(TRUE); |
| 370 | | timer2->reset(m_maincpu->cycles_to_attotime(40000)); |
| 352 | timer2->reset(m_maincpu->cycles_to_attotime(32768/2)); |
| 371 | 353 | } |
| 372 | 354 | |
| 373 | 355 | |
| r243716 | r243717 | |
| 376 | 358 | } |
| 377 | 359 | |
| 378 | 360 | static MACHINE_CONFIG_START( gamate, gamate_state ) |
| 379 | | MCFG_CPU_ADD("maincpu", M6502, 4433000) |
| 361 | MCFG_CPU_ADD("maincpu", M6502, 4433000/2) |
| 380 | 362 | MCFG_CPU_PROGRAM_MAP(gamate_mem) |
| 381 | 363 | MCFG_CPU_VBLANK_INT_DRIVER("screen", gamate_state, gamate_interrupt) |
| 382 | 364 | |
| r243716 | r243717 | |
| 387 | 369 | MCFG_SCREEN_UPDATE_DRIVER(gamate_state, screen_update_gamate) |
| 388 | 370 | MCFG_SCREEN_PALETTE("palette") |
| 389 | 371 | |
| 390 | | #ifdef USE_GFX |
| 391 | | MCFG_GFXDECODE_ADD("gfxdecode", "palette", gamate ) |
| 392 | | #endif |
| 393 | 372 | MCFG_PALETTE_ADD("palette", ARRAY_LENGTH(gamate_colors)) |
| 394 | 373 | MCFG_PALETTE_INIT_OWNER(gamate_state, gamate) |
| 395 | 374 | MCFG_DEFAULT_LAYOUT(layout_lcd) |
| 396 | 375 | |
| 376 | /* sound hardware */ |
| 377 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 378 | MCFG_SOUND_ADD("custom", GAMATE_SND, 0) |
| 379 | MCFG_SOUND_ROUTE(0, "lspeaker", 0.50) |
| 380 | MCFG_SOUND_ROUTE(1, "rspeaker", 0.50) |
| 381 | |
| 397 | 382 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "gamate_cart") |
| 398 | 383 | MCFG_GENERIC_MANDATORY |
| 399 | 384 | |
| r243716 | r243717 | |
| 407 | 392 | ROMX_LOAD("gamate_bios_umc.bin", 0xf000, 0x1000, CRC(07090415) SHA1(ea449dc607601f9a68d855ad6ab53800d2e99297), ROM_BIOS(1) ) |
| 408 | 393 | ROM_SYSTEM_BIOS(1, "newer", "NEWER") |
| 409 | 394 | ROMX_LOAD("gamate_bios_9130__unknown__bit_icasc00001_9130-bs_r32261.bin", 0xf000, 0x1000, CRC(03a5f3a7) SHA1(4e9dfbfe916ca485530ef4221593ab68738e2217), ROM_BIOS(2) ) |
| 410 | | #ifdef USE_GFX |
| 411 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 412 | | #endif |
| 413 | 395 | ROM_END |
| 414 | 396 | |
| 415 | 397 | |
| 416 | 398 | /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */ |
| 417 | | CONS( 19??, gamate, 0, 0, gamate, gamate, gamate_state, gamate, "Bit Corp", "Gamate", GAME_NO_SOUND) |
| 399 | CONS( 19??, gamate, 0, 0, gamate, gamate, gamate_state, gamate, "Bit Corp", "Gamate", GAME_IMPERFECT_SOUND) |
| 400 | |
| 401 | |