trunk/src/mame/drivers/goldstar.c
| r244846 | r244847 | |
| 785 | 785 | AM_RANGE(0xf800, 0xffff) AM_RAM |
| 786 | 786 | ADDRESS_MAP_END |
| 787 | 787 | |
| 788 | | WRITE8_MEMBER(goldstar_state::magodds_outb850_w) |
| 788 | WRITE8_MEMBER(wingco_state::magodds_outb850_w) |
| 789 | 789 | { |
| 790 | 790 | // guess, could be wrong, this might just be lights |
| 791 | 791 | |
| r244846 | r244847 | |
| 801 | 801 | |
| 802 | 802 | } |
| 803 | 803 | |
| 804 | | WRITE8_MEMBER(goldstar_state::magodds_outb860_w) |
| 804 | WRITE8_MEMBER(wingco_state::magodds_outb860_w) |
| 805 | 805 | { |
| 806 | 806 | // popmessage("magodds_outb860_w %02x\n", data); |
| 807 | 807 | } |
| 808 | 808 | |
| 809 | | static ADDRESS_MAP_START(magodds_map, AS_PROGRAM, 8, goldstar_state ) |
| 809 | static ADDRESS_MAP_START( magodds_map, AS_PROGRAM, 8, wingco_state ) |
| 810 | 810 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 811 | 811 | // where does the extra rom data map?? it seems like it should come straight after the existing rom, but it can't if this is a plain z80? |
| 812 | 812 | AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("nvram") |
| r244846 | r244847 | |
| 958 | 958 | { |
| 959 | 959 | //popmessage("unkcm_0x03_w %02x", data); |
| 960 | 960 | |
| 961 | | m_unkch_vidreg = data; |
| 961 | m_vidreg = data; |
| 962 | 962 | |
| 963 | 963 | // -x-- ---- seems to toggle when a 'normal' tilemap should be displayed instead of the reels? |
| 964 | 964 | } |
| r244846 | r244847 | |
| 7477 | 7477 | GFXDECODE_END |
| 7478 | 7478 | |
| 7479 | 7479 | |
| 7480 | | WRITE8_MEMBER(goldstar_state::system_outputa_w) |
| 7480 | WRITE8_MEMBER(wingco_state::system_outputa_w) |
| 7481 | 7481 | { |
| 7482 | 7482 | //popmessage("system_outputa_w %02x",data); |
| 7483 | 7483 | } |
| 7484 | 7484 | |
| 7485 | 7485 | |
| 7486 | | WRITE8_MEMBER(goldstar_state::system_outputb_w) |
| 7486 | WRITE8_MEMBER(wingco_state::system_outputb_w) |
| 7487 | 7487 | { |
| 7488 | 7488 | //popmessage("system_outputb_w %02x",data); |
| 7489 | 7489 | } |
| 7490 | 7490 | |
| 7491 | 7491 | |
| 7492 | | WRITE8_MEMBER(goldstar_state::system_outputc_w) |
| 7492 | WRITE8_MEMBER(wingco_state::system_outputc_w) |
| 7493 | 7493 | { |
| 7494 | | m_lucky8_nmi_enable = data & 8; |
| 7495 | | m_unkch_vidreg = data & 2; |
| 7494 | m_nmi_enable = data & 8; |
| 7495 | m_vidreg = data & 2; |
| 7496 | 7496 | //popmessage("system_outputc_w %02x",data); |
| 7497 | 7497 | } |
| 7498 | 7498 | |
| r244846 | r244847 | |
| 7763 | 7763 | } |
| 7764 | 7764 | } |
| 7765 | 7765 | |
| 7766 | | PALETTE_INIT_MEMBER(goldstar_state,lucky8) |
| 7766 | PALETTE_INIT_MEMBER(goldstar_state, lucky8) |
| 7767 | 7767 | { |
| 7768 | 7768 | /* BBGGGRRR */ |
| 7769 | 7769 | |
| r244846 | r244847 | |
| 8171 | 8171 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 8172 | 8172 | MACHINE_CONFIG_END |
| 8173 | 8173 | |
| 8174 | | INTERRUPT_GEN_MEMBER(goldstar_state::lucky8_irq) |
| 8174 | INTERRUPT_GEN_MEMBER(wingco_state::masked_irq) |
| 8175 | 8175 | { |
| 8176 | | if(m_lucky8_nmi_enable) |
| 8176 | if (m_nmi_enable) |
| 8177 | 8177 | device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); |
| 8178 | 8178 | } |
| 8179 | 8179 | |
| 8180 | | static MACHINE_CONFIG_START( lucky8, goldstar_state ) |
| 8180 | static MACHINE_CONFIG_START( lucky8, wingco_state ) |
| 8181 | 8181 | |
| 8182 | 8182 | /* basic machine hardware */ |
| 8183 | 8183 | MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) |
| 8184 | 8184 | MCFG_CPU_PROGRAM_MAP(lucky8_map) |
| 8185 | 8185 | //MCFG_CPU_IO_MAP(goldstar_readport) |
| 8186 | | MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, lucky8_irq) |
| 8186 | MCFG_CPU_VBLANK_INT_DRIVER("screen", wingco_state, masked_irq) |
| 8187 | 8187 | |
| 8188 | 8188 | MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0) |
| 8189 | 8189 | MCFG_I8255_IN_PORTA_CB(IOPORT("IN0")) |
| r244846 | r244847 | |
| 8197 | 8197 | |
| 8198 | 8198 | MCFG_DEVICE_ADD("ppi8255_2", I8255A, 0) |
| 8199 | 8199 | MCFG_I8255_IN_PORTA_CB(IOPORT("DSW2")) |
| 8200 | | MCFG_I8255_OUT_PORTA_CB(WRITE8(goldstar_state, system_outputa_w)) |
| 8201 | | MCFG_I8255_OUT_PORTB_CB(WRITE8(goldstar_state, system_outputb_w)) |
| 8202 | | MCFG_I8255_OUT_PORTC_CB(WRITE8(goldstar_state, system_outputc_w)) |
| 8200 | MCFG_I8255_OUT_PORTA_CB(WRITE8(wingco_state, system_outputa_w)) |
| 8201 | MCFG_I8255_OUT_PORTB_CB(WRITE8(wingco_state, system_outputb_w)) |
| 8202 | MCFG_I8255_OUT_PORTC_CB(WRITE8(wingco_state, system_outputc_w)) |
| 8203 | 8203 | |
| 8204 | 8204 | /* video hardware */ |
| 8205 | 8205 | MCFG_SCREEN_ADD("screen", RASTER) |
| r244846 | r244847 | |
| 8213 | 8213 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", ncb3) |
| 8214 | 8214 | MCFG_PALETTE_ADD("palette", 256) |
| 8215 | 8215 | MCFG_PALETTE_FORMAT(BBGGGRRR) |
| 8216 | | MCFG_PALETTE_INIT_OWNER(goldstar_state,lucky8) |
| 8216 | MCFG_PALETTE_INIT_OWNER(goldstar_state, lucky8) |
| 8217 | 8217 | MCFG_NVRAM_ADD_1FILL("nvram") |
| 8218 | 8218 | |
| 8219 | 8219 | MCFG_VIDEO_START_OVERRIDE(goldstar_state,goldstar) |
| r244846 | r244847 | |
| 8232 | 8232 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 8233 | 8233 | MACHINE_CONFIG_END |
| 8234 | 8234 | |
| 8235 | | static MACHINE_CONFIG_START( bingowng, goldstar_state ) |
| 8235 | static MACHINE_CONFIG_START( bingowng, wingco_state ) |
| 8236 | 8236 | |
| 8237 | 8237 | /* basic machine hardware */ |
| 8238 | 8238 | MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) |
| 8239 | 8239 | MCFG_CPU_PROGRAM_MAP(lucky8_map) |
| 8240 | 8240 | //MCFG_CPU_IO_MAP(goldstar_readport) |
| 8241 | | MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, lucky8_irq) |
| 8241 | MCFG_CPU_VBLANK_INT_DRIVER("screen", wingco_state, masked_irq) |
| 8242 | 8242 | |
| 8243 | 8243 | MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0) |
| 8244 | 8244 | MCFG_I8255_IN_PORTA_CB(IOPORT("IN0")) |
| r244846 | r244847 | |
| 8252 | 8252 | |
| 8253 | 8253 | MCFG_DEVICE_ADD("ppi8255_2", I8255A, 0) |
| 8254 | 8254 | MCFG_I8255_IN_PORTA_CB(IOPORT("DSW2")) |
| 8255 | | MCFG_I8255_OUT_PORTA_CB(WRITE8(goldstar_state, system_outputa_w)) |
| 8256 | | MCFG_I8255_OUT_PORTB_CB(WRITE8(goldstar_state, system_outputb_w)) |
| 8257 | | MCFG_I8255_OUT_PORTC_CB(WRITE8(goldstar_state, system_outputc_w)) |
| 8255 | MCFG_I8255_OUT_PORTA_CB(WRITE8(wingco_state, system_outputa_w)) |
| 8256 | MCFG_I8255_OUT_PORTB_CB(WRITE8(wingco_state, system_outputb_w)) |
| 8257 | MCFG_I8255_OUT_PORTC_CB(WRITE8(wingco_state, system_outputc_w)) |
| 8258 | 8258 | |
| 8259 | 8259 | /* video hardware */ |
| 8260 | 8260 | MCFG_SCREEN_ADD("screen", RASTER) |
| r244846 | r244847 | |
| 8262 | 8262 | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 8263 | 8263 | MCFG_SCREEN_SIZE(64*8, 32*8) |
| 8264 | 8264 | MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 2*8, 30*8-1) |
| 8265 | | MCFG_SCREEN_UPDATE_DRIVER(goldstar_state, screen_update_bingowng) |
| 8265 | MCFG_SCREEN_UPDATE_DRIVER(wingco_state, screen_update_bingowng) |
| 8266 | 8266 | MCFG_SCREEN_PALETTE("palette") |
| 8267 | 8267 | |
| 8268 | 8268 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", ncb3) |
| r244846 | r244847 | |
| 8270 | 8270 | MCFG_PALETTE_INIT_OWNER(goldstar_state,lucky8) |
| 8271 | 8271 | MCFG_NVRAM_ADD_1FILL("nvram") |
| 8272 | 8272 | |
| 8273 | | MCFG_VIDEO_START_OVERRIDE(goldstar_state,bingowng) |
| 8273 | MCFG_VIDEO_START_OVERRIDE(wingco_state, bingowng) |
| 8274 | 8274 | |
| 8275 | 8275 | /* sound hardware */ |
| 8276 | 8276 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r244846 | r244847 | |
| 8286 | 8286 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 8287 | 8287 | MACHINE_CONFIG_END |
| 8288 | 8288 | |
| 8289 | | static MACHINE_CONFIG_START( bingownga, goldstar_state ) |
| 8290 | | |
| 8291 | | /* basic machine hardware */ |
| 8292 | | MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) |
| 8293 | | MCFG_CPU_PROGRAM_MAP(lucky8_map) |
| 8294 | | //MCFG_CPU_IO_MAP(goldstar_readport) |
| 8295 | | MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, lucky8_irq) |
| 8296 | | |
| 8297 | | MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0) |
| 8298 | | MCFG_I8255_IN_PORTA_CB(IOPORT("IN0")) |
| 8299 | | MCFG_I8255_IN_PORTB_CB(IOPORT("IN1")) |
| 8300 | | MCFG_I8255_IN_PORTC_CB(IOPORT("IN2")) |
| 8301 | | |
| 8302 | | MCFG_DEVICE_ADD("ppi8255_1", I8255A, 0) |
| 8303 | | MCFG_I8255_IN_PORTA_CB(IOPORT("IN3")) |
| 8304 | | MCFG_I8255_IN_PORTB_CB(IOPORT("IN4")) |
| 8305 | | MCFG_I8255_IN_PORTC_CB(IOPORT("DSW1")) |
| 8306 | | |
| 8307 | | MCFG_DEVICE_ADD("ppi8255_2", I8255A, 0) |
| 8308 | | MCFG_I8255_IN_PORTA_CB(IOPORT("DSW2")) |
| 8309 | | MCFG_I8255_OUT_PORTA_CB(WRITE8(goldstar_state, system_outputa_w)) |
| 8310 | | MCFG_I8255_OUT_PORTB_CB(WRITE8(goldstar_state, system_outputb_w)) |
| 8311 | | MCFG_I8255_OUT_PORTC_CB(WRITE8(goldstar_state, system_outputc_w)) |
| 8312 | | |
| 8313 | | /* video hardware */ |
| 8314 | | MCFG_SCREEN_ADD("screen", RASTER) |
| 8315 | | MCFG_SCREEN_REFRESH_RATE(60) |
| 8316 | | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 8317 | | MCFG_SCREEN_SIZE(64*8, 32*8) |
| 8318 | | MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 2*8, 30*8-1) |
| 8319 | | MCFG_SCREEN_UPDATE_DRIVER(goldstar_state, screen_update_bingowng) |
| 8320 | | MCFG_SCREEN_PALETTE("palette") |
| 8321 | | |
| 8322 | | MCFG_GFXDECODE_ADD("gfxdecode", "palette", bingownga) /* GFX Decode is the only difference with the parent machine */ |
| 8323 | | MCFG_PALETTE_ADD("palette", 256) |
| 8324 | | MCFG_PALETTE_INIT_OWNER(goldstar_state,lucky8) |
| 8325 | | MCFG_NVRAM_ADD_1FILL("nvram") |
| 8326 | | |
| 8327 | | MCFG_VIDEO_START_OVERRIDE(goldstar_state,bingowng) |
| 8328 | | |
| 8329 | | /* sound hardware */ |
| 8330 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 8331 | | |
| 8332 | | MCFG_SOUND_ADD("snsnd", SN76489, PSG_CLOCK) |
| 8333 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) |
| 8334 | | |
| 8335 | | MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK) |
| 8336 | | MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW3")) |
| 8337 | | MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW4")) |
| 8338 | | MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(goldstar_state, ay8910_outputa_w)) |
| 8339 | | MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(goldstar_state, ay8910_outputb_w)) |
| 8340 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 8289 | static MACHINE_CONFIG_DERIVED( bingownga, bingowng ) |
| 8290 | MCFG_GFXDECODE_MODIFY("gfxdecode", bingownga) |
| 8341 | 8291 | MACHINE_CONFIG_END |
| 8342 | 8292 | |
| 8343 | | PALETTE_INIT_MEMBER(goldstar_state,magodds) |
| 8293 | PALETTE_INIT_MEMBER(wingco_state, magodds) |
| 8344 | 8294 | { |
| 8345 | 8295 | int i; |
| 8346 | 8296 | for (i = 0; i < 0x100; i++) |
| r244846 | r244847 | |
| 8357 | 8307 | } |
| 8358 | 8308 | } |
| 8359 | 8309 | |
| 8360 | | static MACHINE_CONFIG_START( magodds, goldstar_state ) |
| 8310 | static MACHINE_CONFIG_START( magodds, wingco_state ) |
| 8361 | 8311 | |
| 8362 | 8312 | /* basic machine hardware */ |
| 8363 | 8313 | MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) |
| 8364 | 8314 | MCFG_CPU_PROGRAM_MAP(magodds_map) |
| 8365 | 8315 | //MCFG_CPU_IO_MAP(goldstar_readport) |
| 8366 | | MCFG_CPU_VBLANK_INT_DRIVER("screen", goldstar_state, lucky8_irq) |
| 8316 | MCFG_CPU_VBLANK_INT_DRIVER("screen", wingco_state, masked_irq) |
| 8367 | 8317 | |
| 8368 | 8318 | MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0) |
| 8369 | 8319 | MCFG_I8255_IN_PORTA_CB(IOPORT("IN0")) |
| r244846 | r244847 | |
| 8377 | 8327 | |
| 8378 | 8328 | MCFG_DEVICE_ADD("ppi8255_2", I8255A, 0) |
| 8379 | 8329 | MCFG_I8255_IN_PORTA_CB(IOPORT("DSW2")) |
| 8380 | | MCFG_I8255_OUT_PORTA_CB(WRITE8(goldstar_state, system_outputa_w)) |
| 8381 | | MCFG_I8255_OUT_PORTB_CB(WRITE8(goldstar_state, system_outputb_w)) |
| 8382 | | MCFG_I8255_OUT_PORTC_CB(WRITE8(goldstar_state, system_outputc_w)) |
| 8330 | MCFG_I8255_OUT_PORTA_CB(WRITE8(wingco_state, system_outputa_w)) |
| 8331 | MCFG_I8255_OUT_PORTB_CB(WRITE8(wingco_state, system_outputb_w)) |
| 8332 | MCFG_I8255_OUT_PORTC_CB(WRITE8(wingco_state, system_outputc_w)) |
| 8383 | 8333 | |
| 8384 | 8334 | /* video hardware */ |
| 8385 | 8335 | MCFG_SCREEN_ADD("screen", RASTER) |
| r244846 | r244847 | |
| 8387 | 8337 | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 8388 | 8338 | MCFG_SCREEN_SIZE(64*8, 32*8) |
| 8389 | 8339 | MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 2*8, 30*8-1) |
| 8390 | | MCFG_SCREEN_UPDATE_DRIVER(goldstar_state, screen_update_magical) |
| 8340 | MCFG_SCREEN_UPDATE_DRIVER(wingco_state, screen_update_magical) |
| 8391 | 8341 | MCFG_SCREEN_PALETTE("palette") |
| 8392 | 8342 | |
| 8393 | 8343 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", magodds) |
| 8394 | 8344 | MCFG_PALETTE_ADD("palette", 256) |
| 8395 | | MCFG_PALETTE_INIT_OWNER(goldstar_state,magodds) |
| 8345 | MCFG_PALETTE_INIT_OWNER(wingco_state, magodds) |
| 8396 | 8346 | MCFG_NVRAM_ADD_1FILL("nvram") |
| 8397 | 8347 | |
| 8398 | | MCFG_VIDEO_START_OVERRIDE(goldstar_state,magical) |
| 8348 | MCFG_VIDEO_START_OVERRIDE(wingco_state, magical) |
| 8399 | 8349 | |
| 8400 | 8350 | /* sound hardware */ |
| 8401 | 8351 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r244846 | r244847 | |
| 8443 | 8393 | |
| 8444 | 8394 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", ncb3) |
| 8445 | 8395 | MCFG_PALETTE_ADD("palette", 256) |
| 8446 | | MCFG_PALETTE_INIT_OWNER(goldstar_state,lucky8) |
| 8396 | MCFG_PALETTE_INIT_OWNER(goldstar_state, lucky8) |
| 8447 | 8397 | |
| 8448 | 8398 | MCFG_VIDEO_START_OVERRIDE(goldstar_state,goldstar) |
| 8449 | 8399 | |
| r244846 | r244847 | |
| 8483 | 8433 | |
| 8484 | 8434 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", ncb3) |
| 8485 | 8435 | MCFG_PALETTE_ADD("palette", 256) |
| 8486 | | MCFG_PALETTE_INIT_OWNER(goldstar_state,lucky8) |
| 8436 | MCFG_PALETTE_INIT_OWNER(goldstar_state, lucky8) |
| 8487 | 8437 | MCFG_NVRAM_ADD_1FILL("nvram") |
| 8488 | 8438 | |
| 8489 | 8439 | MCFG_VIDEO_START_OVERRIDE(goldstar_state,goldstar) |
| r244846 | r244847 | |
| 8499 | 8449 | MACHINE_CONFIG_END |
| 8500 | 8450 | |
| 8501 | 8451 | |
| 8502 | | static MACHINE_CONFIG_START( wcat3, goldstar_state ) |
| 8452 | static MACHINE_CONFIG_START( wcat3, wingco_state ) |
| 8503 | 8453 | |
| 8504 | 8454 | /* basic machine hardware */ |
| 8505 | 8455 | MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) |
| r244846 | r244847 | |
| 8519 | 8469 | |
| 8520 | 8470 | MCFG_DEVICE_ADD("ppi8255_2", I8255A, 0) |
| 8521 | 8471 | MCFG_I8255_IN_PORTA_CB(IOPORT("DSW2")) |
| 8522 | | MCFG_I8255_OUT_PORTA_CB(WRITE8(goldstar_state, system_outputa_w)) |
| 8523 | | MCFG_I8255_OUT_PORTB_CB(WRITE8(goldstar_state, system_outputb_w)) |
| 8524 | | MCFG_I8255_OUT_PORTC_CB(WRITE8(goldstar_state, system_outputc_w)) |
| 8472 | MCFG_I8255_OUT_PORTA_CB(WRITE8(wingco_state, system_outputa_w)) |
| 8473 | MCFG_I8255_OUT_PORTB_CB(WRITE8(wingco_state, system_outputb_w)) |
| 8474 | MCFG_I8255_OUT_PORTC_CB(WRITE8(wingco_state, system_outputc_w)) |
| 8525 | 8475 | |
| 8526 | 8476 | /* video hardware */ |
| 8527 | 8477 | MCFG_SCREEN_ADD("screen", RASTER) |
| r244846 | r244847 | |
| 8534 | 8484 | |
| 8535 | 8485 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", ncb3) |
| 8536 | 8486 | MCFG_PALETTE_ADD("palette", 256) |
| 8537 | | MCFG_PALETTE_INIT_OWNER(goldstar_state,lucky8) |
| 8487 | MCFG_PALETTE_INIT_OWNER(goldstar_state, lucky8) |
| 8538 | 8488 | MCFG_NVRAM_ADD_1FILL("nvram") |
| 8539 | 8489 | |
| 8540 | 8490 | MCFG_VIDEO_START_OVERRIDE(goldstar_state,goldstar) |
| r244846 | r244847 | |
| 8773 | 8723 | |
| 8774 | 8724 | static MACHINE_CONFIG_DERIVED( cherrys, ncb3 ) |
| 8775 | 8725 | MCFG_GFXDECODE_MODIFY("gfxdecode", cherrys) |
| 8776 | | |
| 8777 | 8726 | MACHINE_CONFIG_END |
| 8778 | 8727 | |
| 8779 | 8728 | static MACHINE_CONFIG_DERIVED( cm97, ncb3 ) |
| 8780 | 8729 | MCFG_GFXDECODE_MODIFY("gfxdecode", cm97) |
| 8781 | | |
| 8782 | 8730 | MACHINE_CONFIG_END |
| 8783 | 8731 | |
| 8784 | 8732 | |
| r244846 | r244847 | |
| 8840 | 8788 | |
| 8841 | 8789 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", megaline) |
| 8842 | 8790 | MCFG_PALETTE_ADD("palette", 256) |
| 8843 | | MCFG_PALETTE_INIT_OWNER(goldstar_state,lucky8) |
| 8791 | MCFG_PALETTE_INIT_OWNER(goldstar_state, lucky8) |
| 8844 | 8792 | // MCFG_NVRAM_ADD_1FILL("nvram") |
| 8845 | 8793 | |
| 8846 | 8794 | MCFG_VIDEO_START_OVERRIDE(goldstar_state,goldstar) |
| r244846 | r244847 | |
| 8885 | 8833 | |
| 8886 | 8834 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", megaline) |
| 8887 | 8835 | MCFG_PALETTE_ADD("palette", 256) |
| 8888 | | MCFG_PALETTE_INIT_OWNER(goldstar_state,lucky8) |
| 8836 | MCFG_PALETTE_INIT_OWNER(goldstar_state, lucky8) |
| 8889 | 8837 | |
| 8890 | 8838 | MCFG_VIDEO_START_OVERRIDE(goldstar_state, goldstar) |
| 8891 | 8839 | |
| r244846 | r244847 | |
| 10886 | 10834 | |
| 10887 | 10835 | is this the original Magical Odds? |
| 10888 | 10836 | */ |
| 10889 | | DRIVER_INIT_MEMBER(goldstar_state,magoddsc) |
| 10837 | DRIVER_INIT_MEMBER(wingco_state, magoddsc) |
| 10890 | 10838 | { |
| 10891 | 10839 | int A; |
| 10892 | 10840 | UINT8 *ROM = memregion("maincpu")->base(); |
| r244846 | r244847 | |
| 13594 | 13542 | ROM[0x0a92] = 0x9b; |
| 13595 | 13543 | } |
| 13596 | 13544 | |
| 13597 | | DRIVER_INIT_MEMBER(goldstar_state,lucky8a) |
| 13545 | DRIVER_INIT_MEMBER(wingco_state, lucky8a) |
| 13598 | 13546 | { |
| 13599 | 13547 | UINT8 *ROM = memregion("maincpu")->base(); |
| 13600 | 13548 | |
| r244846 | r244847 | |
| 14188 | 14136 | |
| 14189 | 14137 | |
| 14190 | 14138 | GAMEL( 1989, lucky8, 0, lucky8, lucky8, driver_device, 0, ROT0, "Wing Co., Ltd.", "New Lucky 8 Lines (set 1, W-4)", 0, layout_lucky8 ) |
| 14191 | | GAMEL( 1989, lucky8a, lucky8, lucky8, lucky8a, goldstar_state, lucky8a, ROT0, "Wing Co., Ltd.", "New Lucky 8 Lines (set 2, W-4)", 0, layout_lucky8 ) |
| 14139 | GAMEL( 1989, lucky8a, lucky8, lucky8, lucky8a, wingco_state, lucky8a, ROT0, "Wing Co., Ltd.", "New Lucky 8 Lines (set 2, W-4)", 0, layout_lucky8 ) |
| 14192 | 14140 | GAMEL( 1989, lucky8b, lucky8, lucky8, lucky8b, driver_device, 0, ROT0, "Wing Co., Ltd.", "New Lucky 8 Lines (set 3, W-4, extended gfx)", 0, layout_lucky8 ) |
| 14193 | | GAMEL( 1989, lucky8c, lucky8, lucky8, lucky8, goldstar_state, lucky8a, ROT0, "Wing Co., Ltd.", "New Lucky 8 Lines (set 4, W-4)", 0, layout_lucky8 ) |
| 14141 | GAMEL( 1989, lucky8c, lucky8, lucky8, lucky8, wingco_state, lucky8a, ROT0, "Wing Co., Ltd.", "New Lucky 8 Lines (set 4, W-4)", 0, layout_lucky8 ) |
| 14194 | 14142 | GAMEL( 1989, lucky8d, lucky8, lucky8, lucky8d, driver_device, 0, ROT0, "Wing Co., Ltd.", "New Lucky 8 Lines (set 5, W-4, main 40%, d-up 60%)", 0, layout_lucky8 ) |
| 14195 | 14143 | GAMEL( 1989, lucky8e, lucky8, lucky8, lucky8d, driver_device, 0, ROT0, "Wing Co., Ltd.", "New Lucky 8 Lines (set 6, W-4, main 40%, d-up 60%)", 0, layout_lucky8 ) |
| 14196 | 14144 | GAMEL( 198?, ns8lines, 0, lucky8, lucky8b, driver_device, 0, ROT0, "<unknown>", "New Lucky 8 Lines / New Super 8 Lines (W-4)", 0, layout_lucky8 ) |
| r244846 | r244847 | |
| 14211 | 14159 | GAME( 1992, magodds, 0, magodds, magodds, driver_device, 0, ROT0, "Pal Company / Micro Manufacturing Inc.", "Magical Odds (set 1)", GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS ) |
| 14212 | 14160 | GAME( 1992, magoddsa, magodds, magodds, magodds, driver_device, 0, ROT0, "Pal Company / Micro Manufacturing Inc.", "Magical Odds (set 2)", GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS ) |
| 14213 | 14161 | GAME( 1992, magoddsb, magodds, magodds, magodds, driver_device, 0, ROT0, "Pal Company / Micro Manufacturing Inc.", "Magical Odds (set 3)", GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS ) |
| 14214 | | GAME( 1991, magoddsc, magodds, magodds, magoddsc, goldstar_state, magoddsc, ROT0, "Pal Company", "Magical Odds (set 4, custom encrypted CPU block)", GAME_WRONG_COLORS | GAME_NOT_WORKING |GAME_NO_SOUND) |
| 14215 | | GAME( 1991, magoddsd, magodds, magodds, magoddsc, goldstar_state, magoddsc, ROT0, "Pal Company", "Magical Odds (set 5, custom encrypted CPU block)", GAME_WRONG_COLORS | GAME_NOT_WORKING |GAME_NO_SOUND) |
| 14162 | GAME( 1991, magoddsc, magodds, magodds, magoddsc, wingco_state, magoddsc, ROT0, "Pal Company", "Magical Odds (set 4, custom encrypted CPU block)", GAME_WRONG_COLORS | GAME_NOT_WORKING |GAME_NO_SOUND) |
| 14163 | GAME( 1991, magoddsd, magodds, magodds, magoddsc, wingco_state, magoddsc, ROT0, "Pal Company", "Magical Odds (set 5, custom encrypted CPU block)", GAME_WRONG_COLORS | GAME_NOT_WORKING |GAME_NO_SOUND) |
| 14216 | 14164 | |
| 14217 | 14165 | |
| 14218 | 14166 | /* --- Amcoe games --- */ |
trunk/src/mame/includes/goldstar.h
| r244846 | r244847 | |
| 1 | 1 | class goldstar_state : public driver_device |
| 2 | 2 | { |
| 3 | 3 | public: |
| 4 | | goldstar_state(const machine_config &mconfig, device_type type, const char *tag) |
| 5 | | : driver_device(mconfig, type, tag), |
| 4 | goldstar_state(const machine_config &mconfig, device_type type, const char *tag) : |
| 5 | driver_device(mconfig, type, tag), |
| 6 | 6 | m_fg_vidram(*this, "fg_vidram"), |
| 7 | 7 | m_fg_atrram(*this, "fg_atrram"), |
| 8 | 8 | m_bg_vidram(*this, "bg_vidram"), |
| r244846 | r244847 | |
| 37 | 37 | optional_shared_ptr<UINT8> m_reel3_scroll; |
| 38 | 38 | |
| 39 | 39 | |
| 40 | | UINT8 m_unkch_vidreg; |
| 41 | | |
| 42 | 40 | tilemap_t *m_reel1_tilemap; |
| 43 | 41 | tilemap_t *m_reel2_tilemap; |
| 44 | 42 | tilemap_t *m_reel3_tilemap; |
| r244846 | r244847 | |
| 50 | 48 | UINT8 m_cmaster_girl_pal; |
| 51 | 49 | UINT8 m_cm_enable_reg; |
| 52 | 50 | UINT8 m_cm_girl_scroll; |
| 53 | | UINT8 m_lucky8_nmi_enable; |
| 54 | 51 | int m_tile_bank; |
| 55 | 52 | |
| 56 | 53 | DECLARE_WRITE8_MEMBER(protection_w); |
| 57 | 54 | DECLARE_READ8_MEMBER(protection_r); |
| 55 | DECLARE_WRITE8_MEMBER(lucky8_outport_w); |
| 58 | 56 | DECLARE_WRITE8_MEMBER(ncb3_port81_w); |
| 59 | 57 | DECLARE_WRITE8_MEMBER(goldstar_lamps_w); |
| 60 | 58 | DECLARE_WRITE8_MEMBER(cb3_lamps_w); |
| 61 | 59 | DECLARE_WRITE8_MEMBER(cm_outport1_w); |
| 62 | 60 | DECLARE_WRITE8_MEMBER(pkrmast_lamps_w); |
| 63 | | DECLARE_WRITE8_MEMBER(lucky8_outport_w); |
| 64 | | DECLARE_WRITE8_MEMBER(magodds_outb850_w); |
| 65 | | DECLARE_WRITE8_MEMBER(magodds_outb860_w); |
| 66 | 61 | DECLARE_WRITE8_MEMBER(ladylinr_outport_w); |
| 67 | 62 | DECLARE_READ8_MEMBER(fixedvalb4_r); |
| 68 | 63 | DECLARE_READ8_MEMBER(fixedvala8_r); |
| r244846 | r244847 | |
| 92 | 87 | DECLARE_WRITE8_MEMBER(goldstar_reel3_ram_w); |
| 93 | 88 | DECLARE_WRITE8_MEMBER(goldstar_fa00_w); |
| 94 | 89 | DECLARE_WRITE8_MEMBER(cm_background_col_w); |
| 95 | | DECLARE_WRITE8_MEMBER(system_outputa_w); |
| 96 | | DECLARE_WRITE8_MEMBER(system_outputb_w); |
| 97 | | DECLARE_WRITE8_MEMBER(system_outputc_w); |
| 98 | 90 | DECLARE_WRITE8_MEMBER(ay8910_outputa_w); |
| 99 | 91 | DECLARE_WRITE8_MEMBER(ay8910_outputb_w); |
| 100 | 92 | DECLARE_DRIVER_INIT(goldstar); |
| 101 | 93 | DECLARE_DRIVER_INIT(cmast91); |
| 102 | 94 | DECLARE_DRIVER_INIT(nfb96_dk); |
| 103 | 95 | DECLARE_DRIVER_INIT(cm); |
| 104 | | DECLARE_DRIVER_INIT(lucky8a); |
| 105 | 96 | DECLARE_DRIVER_INIT(nfb96sea); |
| 106 | 97 | DECLARE_DRIVER_INIT(schery97a); |
| 107 | 98 | DECLARE_DRIVER_INIT(rp35); |
| r244846 | r244847 | |
| 116 | 107 | DECLARE_DRIVER_INIT(po33); |
| 117 | 108 | DECLARE_DRIVER_INIT(match133); |
| 118 | 109 | DECLARE_DRIVER_INIT(rp36c3); |
| 119 | | DECLARE_DRIVER_INIT(magoddsc); |
| 120 | 110 | DECLARE_DRIVER_INIT(nfb96_c1); |
| 121 | 111 | DECLARE_DRIVER_INIT(fb2010); |
| 122 | 112 | DECLARE_DRIVER_INIT(super9); |
| r244846 | r244847 | |
| 131 | 121 | DECLARE_VIDEO_START(cherrym); |
| 132 | 122 | DECLARE_PALETTE_INIT(cmast91); |
| 133 | 123 | DECLARE_PALETTE_INIT(lucky8); |
| 134 | | DECLARE_VIDEO_START(bingowng); |
| 135 | | DECLARE_VIDEO_START(magical); |
| 136 | | DECLARE_PALETTE_INIT(magodds); |
| 137 | 124 | UINT32 screen_update_goldstar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 138 | 125 | UINT32 screen_update_cmast91(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 139 | | UINT32 screen_update_bingowng(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 140 | | UINT32 screen_update_magical(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 141 | 126 | UINT32 screen_update_amcoe1a(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 142 | | INTERRUPT_GEN_MEMBER(lucky8_irq); |
| 143 | 127 | void do_blockswaps(UINT8* ROM); |
| 144 | 128 | void dump_to_file( UINT8* ROM); |
| 145 | 129 | required_device<cpu_device> m_maincpu; |
| r244846 | r244847 | |
| 148 | 132 | }; |
| 149 | 133 | |
| 150 | 134 | |
| 135 | class wingco_state : public goldstar_state |
| 136 | { |
| 137 | public: |
| 138 | wingco_state(const machine_config &mconfig, device_type type, const char *tag) : |
| 139 | goldstar_state(mconfig, type, tag) |
| 140 | { |
| 141 | } |
| 142 | |
| 143 | DECLARE_WRITE8_MEMBER(magodds_outb850_w); |
| 144 | DECLARE_WRITE8_MEMBER(magodds_outb860_w); |
| 145 | DECLARE_WRITE8_MEMBER(system_outputa_w); |
| 146 | DECLARE_WRITE8_MEMBER(system_outputb_w); |
| 147 | DECLARE_WRITE8_MEMBER(system_outputc_w); |
| 148 | |
| 149 | DECLARE_DRIVER_INIT(lucky8a); |
| 150 | DECLARE_DRIVER_INIT(magoddsc); |
| 151 | |
| 152 | DECLARE_VIDEO_START(bingowng); |
| 153 | DECLARE_VIDEO_START(magical); |
| 154 | DECLARE_PALETTE_INIT(magodds); |
| 155 | UINT32 screen_update_bingowng(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 156 | UINT32 screen_update_magical(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 157 | |
| 158 | INTERRUPT_GEN_MEMBER(masked_irq); |
| 159 | |
| 160 | private: |
| 161 | UINT8 m_nmi_enable; |
| 162 | UINT8 m_vidreg; |
| 163 | }; |
| 164 | |
| 165 | |
| 151 | 166 | class cb3_state : public goldstar_state |
| 152 | 167 | { |
| 153 | 168 | public: |
| 154 | | cb3_state(const machine_config &mconfig, device_type type, const char *tag) |
| 155 | | : goldstar_state(mconfig, type, tag) |
| 169 | cb3_state(const machine_config &mconfig, device_type type, const char *tag) : |
| 170 | goldstar_state(mconfig, type, tag) |
| 156 | 171 | { |
| 157 | 172 | } |
| 158 | 173 | |
| r244846 | r244847 | |
| 168 | 183 | class chrygld_state : public goldstar_state |
| 169 | 184 | { |
| 170 | 185 | public: |
| 171 | | chrygld_state(const machine_config &mconfig, device_type type, const char *tag) |
| 172 | | : goldstar_state(mconfig, type, tag) |
| 186 | chrygld_state(const machine_config &mconfig, device_type type, const char *tag) : |
| 187 | goldstar_state(mconfig, type, tag) |
| 173 | 188 | { |
| 174 | 189 | } |
| 175 | 190 | |
| r244846 | r244847 | |
| 184 | 199 | class sangho_state : public goldstar_state |
| 185 | 200 | { |
| 186 | 201 | public: |
| 187 | | sangho_state(const machine_config &mconfig, device_type type, const char *tag) |
| 188 | | : goldstar_state(mconfig, type, tag), |
| 202 | sangho_state(const machine_config &mconfig, device_type type, const char *tag) : |
| 203 | goldstar_state(mconfig, type, tag), |
| 189 | 204 | m_reel1_attrram(*this, "reel1_attrram"), |
| 190 | 205 | m_reel2_attrram(*this, "reel2_attrram"), |
| 191 | 206 | m_reel3_attrram(*this, "reel3_attrram") |
| r244846 | r244847 | |
| 225 | 240 | class unkch_state : public goldstar_state |
| 226 | 241 | { |
| 227 | 242 | public: |
| 228 | | unkch_state(const machine_config &mconfig, device_type type, const char *tag) |
| 229 | | : goldstar_state(mconfig, type, tag), |
| 243 | unkch_state(const machine_config &mconfig, device_type type, const char *tag) : |
| 244 | goldstar_state(mconfig, type, tag), |
| 230 | 245 | m_reel1_attrram(*this, "reel1_attrram"), |
| 231 | 246 | m_reel2_attrram(*this, "reel2_attrram"), |
| 232 | 247 | m_reel3_attrram(*this, "reel3_attrram") |
| r244846 | r244847 | |
| 260 | 275 | required_shared_ptr<UINT8> m_reel1_attrram; |
| 261 | 276 | required_shared_ptr<UINT8> m_reel2_attrram; |
| 262 | 277 | required_shared_ptr<UINT8> m_reel3_attrram; |
| 278 | |
| 279 | UINT8 m_vidreg; |
| 263 | 280 | }; |
trunk/src/mame/video/goldstar.c
| r244846 | r244847 | |
| 162 | 162 | m_cm_enable_reg = 0x0b; |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | | VIDEO_START_MEMBER(goldstar_state, bingowng) |
| 166 | | { |
| 167 | | m_reel1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(goldstar_state::get_goldstar_reel1_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 64, 8); |
| 168 | | |
| 169 | | m_reel1_tilemap->set_scroll_cols(64); |
| 170 | | |
| 171 | | m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(goldstar_state::get_goldstar_fg_tile_info),this),TILEMAP_SCAN_ROWS,8,8, 64, 32); |
| 172 | | m_fg_tilemap->set_transparent_pen(0); |
| 173 | | |
| 174 | | // is there an enable reg for this game? |
| 175 | | m_cm_enable_reg = 0x0b; |
| 176 | | } |
| 177 | | |
| 178 | | VIDEO_START_MEMBER(goldstar_state, magical) |
| 179 | | { |
| 180 | | m_reel1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(goldstar_state::get_goldstar_reel1_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 64, 8); |
| 181 | | m_reel2_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(goldstar_state::get_goldstar_reel2_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 64, 8); |
| 182 | | m_reel3_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(goldstar_state::get_goldstar_reel3_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 64, 8); |
| 183 | | |
| 184 | | m_reel1_tilemap->set_scroll_cols(32); |
| 185 | | m_reel2_tilemap->set_scroll_cols(32); |
| 186 | | m_reel3_tilemap->set_scroll_cols(32); |
| 187 | | |
| 188 | | m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(goldstar_state::get_magical_fg_tile_info),this),TILEMAP_SCAN_ROWS,8,8, 64, 32); |
| 189 | | m_fg_tilemap->set_transparent_pen(0); |
| 190 | | |
| 191 | | // is there an enable reg for this game? |
| 192 | | m_cm_enable_reg = 0x0b; |
| 193 | | } |
| 194 | | |
| 195 | 165 | VIDEO_START_MEMBER(goldstar_state, cherrym) |
| 196 | 166 | { |
| 197 | 167 | m_reel1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(goldstar_state::get_goldstar_reel1_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 64, 8); |
| r244846 | r244847 | |
| 311 | 281 | } |
| 312 | 282 | |
| 313 | 283 | |
| 314 | | UINT32 goldstar_state::screen_update_bingowng(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 284 | UINT32 goldstar_state::screen_update_cmast91(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 315 | 285 | { |
| 316 | 286 | int i; |
| 317 | 287 | |
| r244846 | r244847 | |
| 325 | 295 | for (i= 0;i < 64;i++) |
| 326 | 296 | { |
| 327 | 297 | m_reel1_tilemap->set_scrolly(i, m_reel1_scroll[i]); |
| 298 | m_reel2_tilemap->set_scrolly(i, m_reel2_scroll[i]); |
| 299 | m_reel3_tilemap->set_scrolly(i, m_reel3_scroll[i]); |
| 328 | 300 | } |
| 329 | 301 | |
| 302 | const rectangle visible1(0*8, (14+48)*8-1, 4*8, (4+7)*8-1); /* same start for reel1 */ |
| 303 | const rectangle visible2(0*8, (14+48)*8-1, 11*8, (12+7)*8-1); /* 4 pixels less for reel2 */ |
| 304 | const rectangle visible3(0*8, (14+48)*8-1, 19*8, (19+7)*8-1); /* 8 pixels less for reel3 */ |
| 330 | 305 | |
| 331 | | const rectangle visible1(0*8, (14+48)*8-1, 3*8, (4+7)*8-1); |
| 332 | 306 | m_reel1_tilemap->draw(screen, bitmap, visible1, 0, 0); |
| 307 | m_reel2_tilemap->draw(screen, bitmap, visible2, 0, 0); |
| 308 | m_reel3_tilemap->draw(screen, bitmap, visible3, 0, 0); |
| 333 | 309 | } |
| 334 | 310 | |
| 335 | | if (m_cm_enable_reg &0x04) |
| 336 | | { |
| 337 | | if (memregion("user1")->base()) |
| 338 | | { |
| 339 | | gfx_element *gfx = m_gfxdecode->gfx(2); |
| 340 | | int girlyscroll = (INT8)((m_cm_girl_scroll & 0xf0)); |
| 341 | | int girlxscroll = (INT8)((m_cm_girl_scroll & 0x0f)<<4); |
| 342 | | |
| 343 | | gfx->zoom_transpen(bitmap,cliprect,m_cmaster_girl_num,m_cmaster_girl_pal,0,0,-(girlxscroll*2),-(girlyscroll), 0x20000, 0x10000,0); |
| 344 | | } |
| 345 | | } |
| 346 | | |
| 347 | 311 | if (m_cm_enable_reg &0x02) |
| 348 | 312 | { |
| 349 | 313 | m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| r244846 | r244847 | |
| 352 | 316 | return 0; |
| 353 | 317 | } |
| 354 | 318 | |
| 355 | | |
| 356 | | UINT32 goldstar_state::screen_update_magical(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 319 | UINT32 goldstar_state::screen_update_amcoe1a(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 357 | 320 | { |
| 358 | 321 | int i; |
| 359 | 322 | |
| r244846 | r244847 | |
| 364 | 327 | |
| 365 | 328 | if (m_cm_enable_reg &0x08) |
| 366 | 329 | { |
| 367 | | // guess, could be wrong, but different screens clearly need different reel layouts |
| 368 | | if (m_unkch_vidreg & 2) |
| 330 | for (i= 0;i < 64;i++) |
| 369 | 331 | { |
| 370 | | for (i= 0;i < 32;i++) |
| 371 | | { |
| 372 | | m_reel1_tilemap->set_scrolly(i, m_reel1_scroll[i*2]); |
| 373 | | m_reel2_tilemap->set_scrolly(i, m_reel2_scroll[i*2]); |
| 374 | | // m_reel3_tilemap->set_scrolly(i, m_reel3_scroll[i*2]); |
| 375 | | } |
| 376 | | |
| 377 | | |
| 378 | | const rectangle visible1alt(0*8, (16+48)*8-1, 4*8, 16*8-1); |
| 379 | | const rectangle visible2alt(0*8, (16+48)*8-1, 16*8, 28*8-1); |
| 380 | | |
| 381 | | m_reel1_tilemap->draw(screen, bitmap, visible1alt, 0, 0); |
| 382 | | m_reel2_tilemap->draw(screen, bitmap, visible2alt, 0, 0); |
| 383 | | //m_reel3_tilemap->draw(screen, bitmap, &magical_visible3, 0, 0); |
| 332 | m_reel1_tilemap->set_scrolly(i, m_reel1_scroll[i]); |
| 333 | m_reel2_tilemap->set_scrolly(i, m_reel2_scroll[i]); |
| 334 | m_reel3_tilemap->set_scrolly(i, m_reel3_scroll[i]); |
| 384 | 335 | } |
| 385 | | else |
| 386 | | { |
| 387 | | for (i= 0;i < 32;i++) |
| 388 | | { |
| 389 | | m_reel1_tilemap->set_scrolly(i, m_reel1_scroll[i*2]); |
| 390 | | m_reel2_tilemap->set_scrolly(i, m_reel2_scroll[i*2]); |
| 391 | | m_reel3_tilemap->set_scrolly(i, m_reel3_scroll[i*2]); |
| 392 | | } |
| 393 | 336 | |
| 337 | const rectangle visible1(0*8, (14+48)*8-1, 4*8, (4+6)*8-1); |
| 338 | const rectangle visible2(0*8, (14+48)*8-1, 10*8, (10+6)*8-1); |
| 339 | const rectangle visible3(0*8, (14+48)*8-1, 16*8, (16+6)*8-1); |
| 394 | 340 | |
| 395 | | const rectangle visible1(0*8, (14+48)*8-1, 4*8, (4+8)*8-1); |
| 396 | | const rectangle visible2(0*8, (14+48)*8-1, 12*8, (12+8)*8-1); |
| 397 | | const rectangle visible3(0*8, (14+48)*8-1, 20*8, (20+8)*8-1); |
| 341 | m_reel1_tilemap->draw(screen, bitmap, visible1, 0, 0); |
| 342 | m_reel2_tilemap->draw(screen, bitmap, visible2, 0, 0); |
| 343 | m_reel3_tilemap->draw(screen, bitmap, visible3, 0, 0); |
| 344 | } |
| 398 | 345 | |
| 399 | | m_reel1_tilemap->draw(screen, bitmap, visible1, 0, 0); |
| 400 | | m_reel2_tilemap->draw(screen, bitmap, visible2, 0, 0); |
| 401 | | m_reel3_tilemap->draw(screen, bitmap, visible3, 0, 0); |
| 402 | | } |
| 346 | if (m_cm_enable_reg &0x04) |
| 347 | { |
| 348 | // no girls |
| 403 | 349 | } |
| 404 | 350 | |
| 405 | 351 | if (m_cm_enable_reg &0x02) |
| r244846 | r244847 | |
| 410 | 356 | return 0; |
| 411 | 357 | } |
| 412 | 358 | |
| 413 | | UINT32 goldstar_state::screen_update_cmast91(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 359 | |
| 360 | |
| 361 | VIDEO_START_MEMBER(wingco_state, bingowng) |
| 414 | 362 | { |
| 363 | m_reel1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(goldstar_state::get_goldstar_reel1_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 64, 8); |
| 364 | |
| 365 | m_reel1_tilemap->set_scroll_cols(64); |
| 366 | |
| 367 | m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(goldstar_state::get_goldstar_fg_tile_info),this),TILEMAP_SCAN_ROWS,8,8, 64, 32); |
| 368 | m_fg_tilemap->set_transparent_pen(0); |
| 369 | |
| 370 | // is there an enable reg for this game? |
| 371 | m_cm_enable_reg = 0x0b; |
| 372 | } |
| 373 | |
| 374 | VIDEO_START_MEMBER(wingco_state, magical) |
| 375 | { |
| 376 | m_reel1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(goldstar_state::get_goldstar_reel1_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 64, 8); |
| 377 | m_reel2_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(goldstar_state::get_goldstar_reel2_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 64, 8); |
| 378 | m_reel3_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(goldstar_state::get_goldstar_reel3_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 64, 8); |
| 379 | |
| 380 | m_reel1_tilemap->set_scroll_cols(32); |
| 381 | m_reel2_tilemap->set_scroll_cols(32); |
| 382 | m_reel3_tilemap->set_scroll_cols(32); |
| 383 | |
| 384 | m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(goldstar_state::get_magical_fg_tile_info),this),TILEMAP_SCAN_ROWS,8,8, 64, 32); |
| 385 | m_fg_tilemap->set_transparent_pen(0); |
| 386 | |
| 387 | // is there an enable reg for this game? |
| 388 | m_cm_enable_reg = 0x0b; |
| 389 | } |
| 390 | |
| 391 | |
| 392 | UINT32 wingco_state::screen_update_bingowng(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 393 | { |
| 415 | 394 | int i; |
| 416 | 395 | |
| 417 | 396 | bitmap.fill(m_palette->black_pen(), cliprect); |
| r244846 | r244847 | |
| 424 | 403 | for (i= 0;i < 64;i++) |
| 425 | 404 | { |
| 426 | 405 | m_reel1_tilemap->set_scrolly(i, m_reel1_scroll[i]); |
| 427 | | m_reel2_tilemap->set_scrolly(i, m_reel2_scroll[i]); |
| 428 | | m_reel3_tilemap->set_scrolly(i, m_reel3_scroll[i]); |
| 429 | 406 | } |
| 430 | 407 | |
| 431 | | const rectangle visible1(0*8, (14+48)*8-1, 4*8, (4+7)*8-1); /* same start for reel1 */ |
| 432 | | const rectangle visible2(0*8, (14+48)*8-1, 11*8, (12+7)*8-1); /* 4 pixels less for reel2 */ |
| 433 | | const rectangle visible3(0*8, (14+48)*8-1, 19*8, (19+7)*8-1); /* 8 pixels less for reel3 */ |
| 434 | 408 | |
| 409 | const rectangle visible1(0*8, (14+48)*8-1, 3*8, (4+7)*8-1); |
| 435 | 410 | m_reel1_tilemap->draw(screen, bitmap, visible1, 0, 0); |
| 436 | | m_reel2_tilemap->draw(screen, bitmap, visible2, 0, 0); |
| 437 | | m_reel3_tilemap->draw(screen, bitmap, visible3, 0, 0); |
| 438 | 411 | } |
| 439 | 412 | |
| 413 | if (m_cm_enable_reg &0x04) |
| 414 | { |
| 415 | if (memregion("user1")->base()) |
| 416 | { |
| 417 | gfx_element *gfx = m_gfxdecode->gfx(2); |
| 418 | int girlyscroll = (INT8)((m_cm_girl_scroll & 0xf0)); |
| 419 | int girlxscroll = (INT8)((m_cm_girl_scroll & 0x0f)<<4); |
| 420 | |
| 421 | gfx->zoom_transpen(bitmap,cliprect,m_cmaster_girl_num,m_cmaster_girl_pal,0,0,-(girlxscroll*2),-(girlyscroll), 0x20000, 0x10000,0); |
| 422 | } |
| 423 | } |
| 424 | |
| 440 | 425 | if (m_cm_enable_reg &0x02) |
| 441 | 426 | { |
| 442 | 427 | m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| r244846 | r244847 | |
| 445 | 430 | return 0; |
| 446 | 431 | } |
| 447 | 432 | |
| 448 | | UINT32 goldstar_state::screen_update_amcoe1a(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 433 | UINT32 wingco_state::screen_update_magical(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 449 | 434 | { |
| 450 | 435 | int i; |
| 451 | 436 | |
| r244846 | r244847 | |
| 456 | 441 | |
| 457 | 442 | if (m_cm_enable_reg &0x08) |
| 458 | 443 | { |
| 459 | | for (i= 0;i < 64;i++) |
| 444 | // guess, could be wrong, but different screens clearly need different reel layouts |
| 445 | if (m_vidreg & 2) |
| 460 | 446 | { |
| 461 | | m_reel1_tilemap->set_scrolly(i, m_reel1_scroll[i]); |
| 462 | | m_reel2_tilemap->set_scrolly(i, m_reel2_scroll[i]); |
| 463 | | m_reel3_tilemap->set_scrolly(i, m_reel3_scroll[i]); |
| 447 | for (i= 0;i < 32;i++) |
| 448 | { |
| 449 | m_reel1_tilemap->set_scrolly(i, m_reel1_scroll[i*2]); |
| 450 | m_reel2_tilemap->set_scrolly(i, m_reel2_scroll[i*2]); |
| 451 | // m_reel3_tilemap->set_scrolly(i, m_reel3_scroll[i*2]); |
| 452 | } |
| 453 | |
| 454 | |
| 455 | const rectangle visible1alt(0*8, (16+48)*8-1, 4*8, 16*8-1); |
| 456 | const rectangle visible2alt(0*8, (16+48)*8-1, 16*8, 28*8-1); |
| 457 | |
| 458 | m_reel1_tilemap->draw(screen, bitmap, visible1alt, 0, 0); |
| 459 | m_reel2_tilemap->draw(screen, bitmap, visible2alt, 0, 0); |
| 460 | //m_reel3_tilemap->draw(screen, bitmap, &magical_visible3, 0, 0); |
| 464 | 461 | } |
| 462 | else |
| 463 | { |
| 464 | for (i= 0;i < 32;i++) |
| 465 | { |
| 466 | m_reel1_tilemap->set_scrolly(i, m_reel1_scroll[i*2]); |
| 467 | m_reel2_tilemap->set_scrolly(i, m_reel2_scroll[i*2]); |
| 468 | m_reel3_tilemap->set_scrolly(i, m_reel3_scroll[i*2]); |
| 469 | } |
| 465 | 470 | |
| 466 | | const rectangle visible1(0*8, (14+48)*8-1, 4*8, (4+6)*8-1); |
| 467 | | const rectangle visible2(0*8, (14+48)*8-1, 10*8, (10+6)*8-1); |
| 468 | | const rectangle visible3(0*8, (14+48)*8-1, 16*8, (16+6)*8-1); |
| 469 | 471 | |
| 470 | | m_reel1_tilemap->draw(screen, bitmap, visible1, 0, 0); |
| 471 | | m_reel2_tilemap->draw(screen, bitmap, visible2, 0, 0); |
| 472 | | m_reel3_tilemap->draw(screen, bitmap, visible3, 0, 0); |
| 473 | | } |
| 472 | const rectangle visible1(0*8, (14+48)*8-1, 4*8, (4+8)*8-1); |
| 473 | const rectangle visible2(0*8, (14+48)*8-1, 12*8, (12+8)*8-1); |
| 474 | const rectangle visible3(0*8, (14+48)*8-1, 20*8, (20+8)*8-1); |
| 474 | 475 | |
| 475 | | if (m_cm_enable_reg &0x04) |
| 476 | | { |
| 477 | | // no girls |
| 476 | m_reel1_tilemap->draw(screen, bitmap, visible1, 0, 0); |
| 477 | m_reel2_tilemap->draw(screen, bitmap, visible2, 0, 0); |
| 478 | m_reel3_tilemap->draw(screen, bitmap, visible3, 0, 0); |
| 479 | } |
| 478 | 480 | } |
| 479 | 481 | |
| 480 | 482 | if (m_cm_enable_reg &0x02) |
| r244846 | r244847 | |
| 714 | 716 | |
| 715 | 717 | m_cmaster_girl_num = 0; |
| 716 | 718 | m_cmaster_girl_pal = 0; |
| 717 | | m_unkch_vidreg = 0x00; |
| 719 | m_vidreg = 0x00; |
| 718 | 720 | |
| 719 | 721 | m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(goldstar_state::get_cherrym_fg_tile_info),this),TILEMAP_SCAN_ROWS,8,8, 64, 32); |
| 720 | 722 | m_fg_tilemap->set_transparent_pen(0); |
| r244846 | r244847 | |
| 735 | 737 | { |
| 736 | 738 | // guess, this could be something else completely!! |
| 737 | 739 | // only draw the first 'reels' tilemap, but fullscreen, using alt registers? (or no scrolling at all? - doubtful, see girl) |
| 738 | | if (m_unkch_vidreg & 0x40) |
| 740 | if (m_vidreg & 0x40) |
| 739 | 741 | { |
| 740 | 742 | for (i= 0;i < 32;i++) |
| 741 | 743 | { |