Previous 199869 Revisions Next

r24056 Wednesday 3rd July, 2013 at 15:44:52 UTC by Tafoid
Modernizing the seta01 device.  [Osso]
[src/mame/drivers]cchance.c champbwl.c seta.c srmp2.c taito_x.c tnzs.c
[src/mame/includes]seta.h srmp2.h tnzs.h
[src/mame/video]seta.c seta001.c seta001.h srmp2.c tnzs.c

trunk/src/mame/drivers/taito_x.c
r24055r24056
321321#include "sound/2610intf.h"
322322#include "sound/2151intf.h"
323323#include "includes/cchip.h"
324#include "video/seta001.h"
325324
326325class taitox_state : public seta_state
327326{
r24055r24056
440439   AM_RANGE(0x900802, 0x900803) AM_READWRITE_LEGACY(cchip1_ctrl_r, cchip1_ctrl_w)
441440   AM_RANGE(0x900c00, 0x900c01) AM_WRITE_LEGACY(cchip1_bank_w)
442441   AM_RANGE(0xb00000, 0xb00fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram")
443   AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
444   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
445   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
442   AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y
443   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
444   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
446445   AM_RANGE(0xf00000, 0xf03fff) AM_RAM         /* Main RAM */
447446ADDRESS_MAP_END
448447
r24055r24056
455454   AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
456455   AM_RANGE(0x900000, 0x90000f) AM_READWRITE(daisenpu_input_r, daisenpu_input_w)
457456   AM_RANGE(0xb00000, 0xb00fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram")
458   AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
459   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
460   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
457   AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y
458   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
459   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
461460   AM_RANGE(0xf00000, 0xf03fff) AM_RAM         /* Main RAM */
462461ADDRESS_MAP_END
463462
r24055r24056
470469   AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
471470   AM_RANGE(0x900000, 0x90000f) AM_READWRITE(daisenpu_input_r, daisenpu_input_w)
472471   AM_RANGE(0xb00000, 0xb00fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram")
473   AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
474   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
475   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
472   AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y
473   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
474   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
476475   AM_RANGE(0xf00000, 0xf03fff) AM_RAM         /* Main RAM */
477476ADDRESS_MAP_END
478477
r24055r24056
485484   AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
486485   AM_RANGE(0x900000, 0x90000f) AM_READWRITE(daisenpu_input_r, daisenpu_input_w)
487486   AM_RANGE(0xb00000, 0xb00fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram")
488   AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
489   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
490   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
487   AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y
488   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
489   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
491490   AM_RANGE(0xf00000, 0xf03fff) AM_RAM         /* Main RAM */
492491ADDRESS_MAP_END
493492
trunk/src/mame/drivers/cchance.c
r24055r24056
3636#include "cpu/z80/z80.h"
3737#include "includes/tnzs.h"
3838#include "sound/ay8910.h"
39#include "video/seta001.h"
4039
4140class cchance_state : public tnzs_state
4241{
r24055r24056
7776static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, cchance_state )
7877   AM_RANGE(0x0000, 0x7fff) AM_ROM
7978
80   AM_RANGE(0xa000, 0xafff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodelow_r8, spritecodelow_w8)
81   AM_RANGE(0xb000, 0xbfff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodehigh_r8, spritecodehigh_w8)
79   AM_RANGE(0xa000, 0xafff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodelow_r8, spritecodelow_w8)
80   AM_RANGE(0xb000, 0xbfff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodehigh_r8, spritecodehigh_w8)
8281
8382   AM_RANGE(0xc000, 0xdfff) AM_RAM
8483
85   AM_RANGE(0xe000, 0xe2ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r8, spriteylow_w8)
86   AM_RANGE(0xe300, 0xe303) AM_RAM AM_MIRROR(0xfc) AM_DEVWRITE_LEGACY("spritegen", spritectrl_w8)  /* control registers (0x80 mirror used by Arkanoid 2) */
87   AM_RANGE(0xe800, 0xe800) AM_DEVWRITE_LEGACY("spritegen", spritebgflag_w8)   /* enable / disable background transparency */
84   AM_RANGE(0xe000, 0xe2ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r8, spriteylow_w8)
85   AM_RANGE(0xe300, 0xe303) AM_RAM AM_MIRROR(0xfc) AM_DEVWRITE("spritegen", seta001_device, spritectrl_w8)  /* control registers (0x80 mirror used by Arkanoid 2) */
86   AM_RANGE(0xe800, 0xe800) AM_DEVWRITE("spritegen", seta001_device, spritebgflag_w8)   /* enable / disable background transparency */
8887
8988   AM_RANGE(0xf000, 0xf000) AM_READNOP AM_WRITENOP //???
9089   AM_RANGE(0xf001, 0xf001) AM_READ(input_1_r) AM_WRITE(output_0_w)
trunk/src/mame/drivers/tnzs.c
r24055r24056
628628#include "sound/samples.h"
629629#include "includes/tnzs.h"
630630#include "sound/2151intf.h"
631#include "video/seta001.h"
632631
633632static SAMPLES_START( kageki_init_samples )
634633{
r24055r24056
748747static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, tnzs_state )
749748   AM_RANGE(0x0000, 0x7fff) AM_ROM
750749   AM_RANGE(0x8000, 0xbfff) AM_READWRITE( tnzs_ramrom_bank_r, tnzs_ramrom_bank_w ) /* ROM + RAM */
751   AM_RANGE(0xc000, 0xcfff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodelow_r8, spritecodelow_w8)
752   AM_RANGE(0xd000, 0xdfff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodehigh_r8, spritecodehigh_w8)
750   AM_RANGE(0xc000, 0xcfff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodelow_r8, spritecodelow_w8)
751   AM_RANGE(0xd000, 0xdfff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodehigh_r8, spritecodehigh_w8)
753752   AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE("share1")
754   AM_RANGE(0xf000, 0xf2ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r8, spriteylow_w8)
755   AM_RANGE(0xf300, 0xf303) AM_MIRROR(0xfc) AM_DEVWRITE_LEGACY("spritegen", spritectrl_w8)  /* control registers (0x80 mirror used by Arkanoid 2) */
756   AM_RANGE(0xf400, 0xf400) AM_DEVWRITE_LEGACY("spritegen", spritebgflag_w8)   /* enable / disable background transparency */
753   AM_RANGE(0xf000, 0xf2ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r8, spriteylow_w8)
754   AM_RANGE(0xf300, 0xf303) AM_MIRROR(0xfc) AM_DEVWRITE("spritegen", seta001_device, spritectrl_w8)  /* control registers (0x80 mirror used by Arkanoid 2) */
755   AM_RANGE(0xf400, 0xf400) AM_DEVWRITE("spritegen", seta001_device, spritebgflag_w8)   /* enable / disable background transparency */
757756   AM_RANGE(0xf600, 0xf600) AM_READNOP AM_WRITE(tnzs_ramrom_bankswitch_w)
758757   /* arknoid2, extrmatn, plumppop and drtoppel have PROMs instead of RAM */
759758   /* drtoppel writes here anyway! (maybe leftover from tests during development) */
r24055r24056
764763static ADDRESS_MAP_START( cpu0_type2, AS_PROGRAM, 8, tnzs_state )
765764   AM_RANGE(0x0000, 0x7fff) AM_ROM
766765   AM_RANGE(0x8000, 0xbfff) AM_READWRITE( tnzs_ramrom_bank_r, tnzs_ramrom_bank_w ) /* ROM + RAM */
767   AM_RANGE(0xc000, 0xcfff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodelow_r8, spritecodelow_w8)
768   AM_RANGE(0xd000, 0xdfff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodehigh_r8, spritecodehigh_w8)
766   AM_RANGE(0xc000, 0xcfff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodelow_r8, spritecodelow_w8)
767   AM_RANGE(0xd000, 0xdfff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodehigh_r8, spritecodehigh_w8)
769768   AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE("share1")
770   AM_RANGE(0xf000, 0xf2ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r8, spriteylow_w8)
771   AM_RANGE(0xf300, 0xf303) AM_MIRROR(0xfc) AM_DEVWRITE_LEGACY("spritegen", spritectrl_w8) /* control registers (0x80 mirror used by Arkanoid 2) */
772   AM_RANGE(0xf400, 0xf400) AM_DEVWRITE_LEGACY("spritegen", spritebgflag_w8)   /* enable / disable background transparency */
769   AM_RANGE(0xf000, 0xf2ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r8, spriteylow_w8)
770   AM_RANGE(0xf300, 0xf303) AM_MIRROR(0xfc) AM_DEVWRITE("spritegen", seta001_device, spritectrl_w8) /* control registers (0x80 mirror used by Arkanoid 2) */
771   AM_RANGE(0xf400, 0xf400) AM_DEVWRITE("spritegen", seta001_device, spritebgflag_w8)   /* enable / disable background transparency */
773772   AM_RANGE(0xf600, 0xf600) AM_WRITE(tnzs_ramrom_bankswitch_w)
774773   /* kabukiz still writes here but it's not used (it's paletteram in type1 map) */
775774   AM_RANGE(0xf800, 0xfbff) AM_WRITENOP
r24055r24056
887886static ADDRESS_MAP_START( jpopnics_main_map, AS_PROGRAM, 8, tnzs_state )
888887   AM_RANGE(0x0000, 0x7fff) AM_ROM
889888   AM_RANGE(0x8000, 0xbfff) AM_READWRITE( tnzs_ramrom_bank_r, tnzs_ramrom_bank_w )
890   AM_RANGE(0xc000, 0xcfff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodelow_r8, spritecodelow_w8)
891   AM_RANGE(0xd000, 0xdfff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodehigh_r8, spritecodehigh_w8)
889   AM_RANGE(0xc000, 0xcfff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodelow_r8, spritecodelow_w8)
890   AM_RANGE(0xd000, 0xdfff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodehigh_r8, spritecodehigh_w8)
892891   AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE("share1") /* WORK RAM (shared by the 2 z80's) */
893   AM_RANGE(0xf000, 0xf2ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r8, spriteylow_w8)
894   AM_RANGE(0xf300, 0xf303) AM_MIRROR(0xfc) AM_DEVWRITE_LEGACY("spritegen", spritectrl_w8) /* control registers (0x80 mirror used by Arkanoid 2) */
895   AM_RANGE(0xf400, 0xf400) AM_DEVWRITE_LEGACY("spritegen", spritebgflag_w8)   /* enable / disable background transparency */
892   AM_RANGE(0xf000, 0xf2ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r8, spriteylow_w8)
893   AM_RANGE(0xf300, 0xf303) AM_MIRROR(0xfc) AM_DEVWRITE("spritegen", seta001_device, spritectrl_w8) /* control registers (0x80 mirror used by Arkanoid 2) */
894   AM_RANGE(0xf400, 0xf400) AM_DEVWRITE("spritegen", seta001_device, spritebgflag_w8)   /* enable / disable background transparency */
896895   AM_RANGE(0xf600, 0xf600) AM_READNOP AM_WRITE(tnzs_ramrom_bankswitch_w)
897896   AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(jpopnics_palette_w) AM_SHARE("paletteram")
898897ADDRESS_MAP_END
trunk/src/mame/drivers/champbwl.c
r24055r24056
156156#include "machine/nvram.h"
157157#include "machine/ticket.h"
158158#include "includes/tnzs.h"
159#include "video/seta001.h"
160159
161160class champbwl_state : public tnzs_state
162161{
r24055r24056
208207   AM_RANGE(0x0000, 0x3fff) AM_ROM AM_REGION("maincpu", 0x10000)
209208   AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
210209   AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("nvram")
211   AM_RANGE(0xa000, 0xafff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodelow_r8, spritecodelow_w8)
212   AM_RANGE(0xb000, 0xbfff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodehigh_r8, spritecodehigh_w8)
210   AM_RANGE(0xa000, 0xafff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodelow_r8, spritecodelow_w8)
211   AM_RANGE(0xb000, 0xbfff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodehigh_r8, spritecodehigh_w8)
213212   AM_RANGE(0xc000, 0xdfff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_r, seta_sound_w)
214   AM_RANGE(0xe000, 0xe2ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r8, spriteylow_w8)
215   AM_RANGE(0xe300, 0xe303) AM_MIRROR(0xfc) AM_DEVWRITE_LEGACY("spritegen", spritectrl_w8) /* control registers (0x80 mirror used by Arkanoid 2) */
216   AM_RANGE(0xe800, 0xe800) AM_DEVWRITE_LEGACY("spritegen", spritebgflag_w8)   /* enable / disable background transparency */
213   AM_RANGE(0xe000, 0xe2ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r8, spriteylow_w8)
214   AM_RANGE(0xe300, 0xe303) AM_MIRROR(0xfc) AM_DEVWRITE("spritegen", seta001_device, spritectrl_w8) /* control registers (0x80 mirror used by Arkanoid 2) */
215   AM_RANGE(0xe800, 0xe800) AM_DEVWRITE("spritegen", seta001_device, spritebgflag_w8)   /* enable / disable background transparency */
217216
218217   AM_RANGE(0xf000, 0xf000) AM_READ(trackball_r)
219218   AM_RANGE(0xf002, 0xf002) AM_READ_PORT("IN0")
r24055r24056
247246   AM_RANGE(0x0000, 0x3fff) AM_ROM
248247   AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
249248   AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("nvram")
250   AM_RANGE(0xa000, 0xafff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodelow_r8, spritecodelow_w8)
251   AM_RANGE(0xb000, 0xbfff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodehigh_r8, spritecodehigh_w8)
249   AM_RANGE(0xa000, 0xafff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodelow_r8, spritecodelow_w8)
250   AM_RANGE(0xb000, 0xbfff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodehigh_r8, spritecodehigh_w8)
252251   AM_RANGE(0xc000, 0xc07f) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_r,seta_sound_w) // Sound
253   AM_RANGE(0xe000, 0xe2ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r8, spriteylow_w8)
254   AM_RANGE(0xe300, 0xe303) AM_DEVWRITE_LEGACY("spritegen", spritectrl_w8)
255   AM_RANGE(0xe800, 0xe800) AM_DEVWRITE_LEGACY("spritegen", spritebgflag_w8)   /* enable / disable background transparency */
252   AM_RANGE(0xe000, 0xe2ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r8, spriteylow_w8)
253   AM_RANGE(0xe300, 0xe303) AM_DEVWRITE("spritegen", seta001_device, spritectrl_w8)
254   AM_RANGE(0xe800, 0xe800) AM_DEVWRITE("spritegen", seta001_device, spritebgflag_w8)   /* enable / disable background transparency */
256255   AM_RANGE(0xf000, 0xf000) AM_READ_PORT("IN0") AM_WRITE(doraemon_outputs_w)
257256   AM_RANGE(0xf002, 0xf002) AM_READ_PORT("IN1") AM_WRITENOP    // Ack?
258257   AM_RANGE(0xf004, 0xf004) AM_WRITENOP                        // Ack?
r24055r24056
457456{
458457   bitmap.fill(0x1f0, cliprect);
459458
460   machine().device<seta001_device>("spritegen")->set_fg_yoffsets( -0x12, 0x0e );
461   machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x1, -0x1 );
459   m_seta001->set_fg_yoffsets( -0x12, 0x0e );
460   m_seta001->set_bg_yoffsets( 0x1, -0x1 );
462461
463   machine().device<seta001_device>("spritegen")->seta001_draw_sprites(machine(), bitmap, cliprect, 0x800, 1 );
462   m_seta001->draw_sprites(bitmap, cliprect, 0x800, 1 );
464463   return 0;
465464}
466465
r24055r24056
468467{
469468   // rising edge
470469   if (state)
471      machine().device<seta001_device>("spritegen")->tnzs_eof();
470      m_seta001->tnzs_eof();
472471}
473472
474473
r24055r24056
516515{
517516   bitmap.fill(0x1f0, cliprect);
518517
519   machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x00, 0x01 );
520   machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x00, 0x10 );
518   m_seta001->set_bg_yoffsets( 0x00, 0x01 );
519   m_seta001->set_fg_yoffsets( 0x00, 0x10 );
521520
522   machine().device<seta001_device>("spritegen")->seta001_draw_sprites(machine(), bitmap, cliprect, 0x800, 1 );
521   m_seta001->draw_sprites(bitmap, cliprect, 0x800, 1 );
523522   return 0;
524523}
525524
r24055r24056
527526{
528527   // rising edge
529528   if (state)
530      machine().device<seta001_device>("spritegen")->setac_eof();
529      m_seta001->setac_eof();
531530}
532531
533532MACHINE_START_MEMBER(champbwl_state,doraemon)
trunk/src/mame/drivers/seta.c
r24055r24056
13681368#include "sound/okim6295.h"
13691369#include "sound/x1_010.h"
13701370#include "sound/2151intf.h"
1371#include "video/seta001.h"
13721371#include "machine/nvram.h"
13731372
13741373#if __uPD71054_TIMER
r24055r24056
15921591   // rising edge
15931592   if (state)
15941593   {
1595      machine().device<seta001_device>("spritegen")->setac_eof();
1594      m_seta001->setac_eof();
15961595   }
15971596}
15981597
r24055r24056
16301629   AM_RANGE(0x300000, 0x300001) AM_WRITENOP                        // ? 0 / 1
16311630   AM_RANGE(0x380000, 0x3803ff) AM_RAM AM_SHARE("paletteram") // Palette
16321631/**/AM_RANGE(0x400000, 0x400001) AM_WRITENOP                        // ? $4000
1633/**/AM_RANGE(0x600000, 0x6005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
1634   AM_RANGE(0x600600, 0x600607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
1632/**/AM_RANGE(0x600000, 0x6005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
1633   AM_RANGE(0x600600, 0x600607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
16351634
16361635   AM_RANGE(0x800000, 0x800007) AM_WRITE(sub_ctrl_w)               // Sub CPU Control?
16371636   AM_RANGE(0xa00000, 0xa00fff) AM_READWRITE(sharedram_68000_r,sharedram_68000_w)  // Shared RAM
1638   AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
1637   AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
16391638   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_SHARE("share1")                  // RAM (Mirrored?)
16401639   AM_RANGE(0xffc000, 0xffffff) AM_RAM AM_SHARE("share1")                  // RAM (Mirrored?)
16411640ADDRESS_MAP_END
r24055r24056
16601659   AM_RANGE(0xa00000, 0xa00007) AM_WRITE(sub_ctrl_w)               // Sub CPU Control?
16611660   AM_RANGE(0xb00000, 0xb00fff) AM_READWRITE(sharedram_68000_r,sharedram_68000_w)  // Shared RAM
16621661   AM_RANGE(0xc00000, 0xc00001) AM_WRITENOP                        // ? $4000
1663   AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
1664   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
1665   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
1662   AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
1663   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
1664   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
16661665   AM_RANGE(0xf00000, 0xffffff) AM_RAM                             // RAM
16671666ADDRESS_MAP_END
16681667
r24055r24056
17201719
17211720   AM_RANGE(0x904000, 0x904fff) AM_RAM                             //
17221721   AM_RANGE(0xa00000, 0xa00019) AM_READ(calibr50_ip_r)             // Input Ports
1723/**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
1724   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
1725   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
1722/**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
1723   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
1724   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
17261725   AM_RANGE(0xb00000, 0xb00001) AM_READ(soundlatch2_word_r) AM_WRITE(calibr50_soundlatch_w)    // From Sub CPU
17271726/**/AM_RANGE(0xc00000, 0xc00001) AM_RAM                             // ? $4000
17281727ADDRESS_MAP_END
r24055r24056
17891788static ADDRESS_MAP_START( usclssic_map, AS_PROGRAM, 16, seta_state )
17901789   AM_RANGE(0x000000, 0x07ffff) AM_ROM                                 // ROM
17911790   AM_RANGE(0xff0000, 0xffffff) AM_RAM                                 // RAM
1792   AM_RANGE(0x800000, 0x8005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
1793   AM_RANGE(0x800600, 0x800607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
1791   AM_RANGE(0x800000, 0x8005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y
1792   AM_RANGE(0x800600, 0x800607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
17941793/**/AM_RANGE(0x900000, 0x900001) AM_RAM                                 // ? $4000
17951794   AM_RANGE(0xa00000, 0xa00005) AM_RAM AM_SHARE("vctrl_0")         // VRAM Ctrl
17961795/**/AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_SHARE("paletteram")  // Palette
r24055r24056
18031802   AM_RANGE(0xb40018, 0xb4001f) AM_READ(usclssic_dsw_r)                // 2 DSWs
18041803   AM_RANGE(0xb40018, 0xb40019) AM_WRITE(watchdog_reset16_w)           // Watchdog
18051804   AM_RANGE(0xb80000, 0xb80001) AM_READNOP                             // Watchdog (value is discarded)?
1806   AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)         // Sprites Code + X + Attr
1805   AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)         // Sprites Code + X + Attr
18071806   AM_RANGE(0xd00000, 0xd03fff) AM_RAM_WRITE(seta_vram_0_w) AM_SHARE("vram_0") // VRAM
18081807   AM_RANGE(0xd04000, 0xd04fff) AM_RAM                                 //
18091808   AM_RANGE(0xe00000, 0xe00fff) AM_RAM                                 // NVRAM? (odd bytes)
r24055r24056
18231822   AM_RANGE(0x500000, 0x500001) AM_WRITENOP                        // ? (end of lev 1: bit 4 goes 1,0,1)
18241823   AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r)                // DSW
18251824   AM_RANGE(0x700000, 0x7003ff) AM_RAM AM_SHARE("paletteram")  // Palette
1826   AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
1827   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
1825   AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
1826   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
18281827   AM_RANGE(0xb00000, 0xb00001) AM_READ_PORT("P1")                 // P1
18291828   AM_RANGE(0xb00002, 0xb00003) AM_READ_PORT("P2")                 // P2
18301829   AM_RANGE(0xb00004, 0xb00005) AM_READ_PORT("COINS")              // Coins
18311830/**/AM_RANGE(0xc00000, 0xc00001) AM_RAM                             // ? 0x4000
1832   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
1831   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
18331832ADDRESS_MAP_END
18341833
18351834
r24055r24056
18501849   AM_RANGE(0x700000, 0x7003ff) AM_RAM                             // (rezon,jjsquawk)
18511850   AM_RANGE(0x700400, 0x700fff) AM_RAM AM_SHARE("paletteram")  // Palette
18521851   AM_RANGE(0x703c00, 0x7047ff) AM_RAM AM_SHARE("paletteram2") // 2nd Palette for the palette offset effect
1853/**/AM_RANGE(0x800000, 0x8005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
1854   AM_RANGE(0x800600, 0x800607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
1852/**/AM_RANGE(0x800000, 0x8005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
1853   AM_RANGE(0x800600, 0x800607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
18551854   AM_RANGE(0x880000, 0x880001) AM_RAM                             // ? 0xc000
1856   AM_RANGE(0x900000, 0x903fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
1855   AM_RANGE(0x900000, 0x903fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
18571856/**/AM_RANGE(0xa00000, 0xa00005) AM_RAM AM_SHARE("vctrl_0")     // VRAM 0&1 Ctrl
18581857/**/AM_RANGE(0xa80000, 0xa80005) AM_RAM AM_SHARE("vctrl_2")     // VRAM 2&3 Ctrl
18591858   AM_RANGE(0xb00000, 0xb03fff) AM_RAM_WRITE(seta_vram_0_w) AM_SHARE("vram_0") // VRAM 0&1
r24055r24056
18911890   AM_RANGE(0x884000, 0x88ffff) AM_RAM                             // (jjsquawk)
18921891/**/AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0")     // VRAM 0&1 Ctrl
18931892/**/AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2")     // VRAM 2&3 Ctrl
1894/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
1895   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
1893/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
1894   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
18961895/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM                             // ? 0x4000
1897   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
1896   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
18981897   AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w)   // Sound
18991898   AM_RANGE(0xd00000, 0xd00007) AM_WRITENOP                        // ?
19001899   AM_RANGE(0xe00000, 0xe00001) AM_WRITENOP                        // ? VBlank IRQ Ack
r24055r24056
19711970   AM_RANGE(0x884000, 0x88ffff) AM_RAM                             // (jjsquawk)
19721971/**/AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0")     // VRAM 0&1 Ctrl
19731972/**/AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2")     // VRAM 2&3 Ctrl
1974/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
1975   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
1973/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
1974   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
19761975/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM                             // ? 0x4000
1977   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
1976   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
19781977   AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w)   // Sound
19791978#if __uPD71054_TIMER
19801979   AM_RANGE(0xd00000, 0xd00007) AM_WRITE(timer_regs_w)             // ?
r24055r24056
20142013   AM_RANGE(0x902010, 0x902013) AM_READ(zingzipbl_unknown_r )
20152014
20162015/**/AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2")     // VRAM 2&3 Ctrl
2017/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2018   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2016/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2017   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
20192018/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM                             // ? 0x4000
2020   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2019   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
20212020   AM_RANGE(0xc00000, 0xc03fff) AM_RAM // soundram on original
20222021#if __uPD71054_TIMER
20232022   AM_RANGE(0xd00000, 0xd00007) AM_WRITE(timer_regs_w)             // ?
r24055r24056
20472046   AM_RANGE(0x884000, 0x88ffff) AM_RAM                             // (jjsquawk)
20482047   AM_RANGE(0x908000, 0x908005) AM_RAM AM_SHARE("vctrl_0")     // VRAM 0&1 Ctrl
20492048   AM_RANGE(0x909000, 0x909005) AM_RAM AM_SHARE("vctrl_2")     // VRAM 2&3 Ctrl
2050   AM_RANGE(0xa0a000, 0xa0a5ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // RZ: Sprites Y
2051   AM_RANGE(0xa0a600, 0xa0a607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2049   AM_RANGE(0xa0a000, 0xa0a5ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // RZ: Sprites Y
2050   AM_RANGE(0xa0a600, 0xa0a607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
20522051// AM_RANGE(0xa80000, 0xa80001) AM_RAM                              // ? 0x4000
2053   AM_RANGE(0xb0c000, 0xb0ffff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // RZ: Sprites Code + X + Attr
2052   AM_RANGE(0xb0c000, 0xb0ffff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // RZ: Sprites Code + X + Attr
20542053   AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w)   // Sound
20552054#if __uPD71054_TIMER
20562055   AM_RANGE(0xd00000, 0xd00007) AM_WRITE(timer_regs_w)             // ?
r24055r24056
20802079   AM_RANGE(0x800100, 0x8001ff) AM_RAM                             // NVRAM
20812080   AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w)   // Sound
20822081   AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_SHARE("paletteram")  // Palette
2083   AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2082   AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
20842083/**/AM_RANGE(0xd00000, 0xd00001) AM_RAM                             // ? 0x4000
2085/**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2086   AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2084/**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2085   AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
20872086ADDRESS_MAP_END
20882087
20892088/***************************************************************************
r24055r24056
21612160   AM_RANGE(0x900002, 0x900003) AM_WRITE(keroppi_prize_w)          //
21622161   AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w)   // Sound
21632162   AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_SHARE("paletteram")  // Palette
2164   AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2163   AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
21652164/**/AM_RANGE(0xd00000, 0xd00001) AM_RAM                             // ? 0x4000
2166/**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2167   AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2165/**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2166   AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
21682167ADDRESS_MAP_END
21692168
21702169MACHINE_START_MEMBER(seta_state,keroppi)
r24055r24056
21922191   AM_RANGE(0x500004, 0x500005) AM_READ_PORT("COINS")              // Coins
21932192   AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w)   // Sound
21942193   AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_SHARE("paletteram")  // Palette
2195   AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
2194   AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
21962195/**/AM_RANGE(0xd00000, 0xd00001) AM_RAM // ? 0x4000
2197/**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
2198   AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2196/**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y
2197   AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
21992198ADDRESS_MAP_END
22002199
22012200
r24055r24056
22212220   AM_RANGE(0x884000, 0x88ffff) AM_RAM                             //
22222221   AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0")     // VRAM 0&1 Ctrl
22232222   AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2")     // VRAM 2&3 Ctrl
2224   AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
2225   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2223   AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y
2224   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
22262225
22272226   AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000
2228   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
2227   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
22292228   AM_RANGE(0xb04000, 0xb13fff) AM_RAM
22302229   AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w)   // Sound
22312230   AM_RANGE(0xe00000, 0xe00001) AM_WRITENOP    //
r24055r24056
22542253   AM_RANGE(0xb00004, 0xb00005) AM_READ_PORT("COINS")              // Coins
22552254   AM_RANGE(0xb00006, 0xb00007) AM_READNOP                         // unused (qzkklogy)
22562255/**/AM_RANGE(0xc00000, 0xc00001) AM_RAM                             // ? $4000
2257/**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2258   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2259   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2256/**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2257   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
2258   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
22602259ADDRESS_MAP_END
22612260
22622261/***************************************************************************
r24055r24056
22682267
22692268WRITE16_MEMBER(seta_state::setaroul_spriteylow_w)
22702269{
2271   seta001_device *dev = machine().device<seta001_device>("spritegen");
2272   if ((offset&1)==0) spriteylow_w8(dev, space, offset>>1, (data & 0xff00) >> 8);
2270   if ((offset&1)==0) m_seta001->spriteylow_w8(space, offset>>1, (data & 0xff00) >> 8);
22732271}
22742272
22752273WRITE16_MEMBER(seta_state::setaroul_spritectrl_w)
22762274{
2277   seta001_device *dev = machine().device<seta001_device>("spritegen");
2278   if ((offset&1)==0) spritectrl_w8(dev, space, offset>>1, (data & 0xff00) >> 8);
2275   if ((offset&1)==0) m_seta001->spritectrl_w8(space, offset>>1, (data & 0xff00) >> 8);
22792276}
22802277
22812278WRITE16_MEMBER(seta_state::setaroul_spritecode_w)
22822279{
2283   seta001_device *dev = machine().device<seta001_device>("spritegen");
2284   if ((offset&1)==1) spritecodelow_w8(dev, space, offset>>1, (data & 0xff00) >> 8);
2285   if ((offset&1)==0) spritecodehigh_w8(dev, space, offset>>1, (data & 0xff00) >> 8);
2280   if ((offset&1)==1) m_seta001->spritecodelow_w8(space, offset>>1, (data & 0xff00) >> 8);
2281   if ((offset&1)==0) m_seta001->spritecodehigh_w8(space, offset>>1, (data & 0xff00) >> 8);
22862282}
22872283
22882284READ16_MEMBER(seta_state::setaroul_spritecode_r)
22892285{
22902286   UINT16 ret;
2291   seta001_device *dev = machine().device<seta001_device>("spritegen");
22922287   if ((offset&1)==1)
2293      ret = spritecodelow_r8(dev, space, offset>>1);
2288      ret = m_seta001->spritecodelow_r8(space, offset>>1);
22942289   else
2295      ret = spritecodehigh_r8(dev, space, offset>>1);
2290      ret = m_seta001->spritecodehigh_r8(space, offset>>1);
22962291   return ret << 8;
22972292}
22982293
r24055r24056
23532348   AM_RANGE(0x884000, 0x88ffff) AM_RAM                             //
23542349/**/AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0")     // VRAM 0&1 Ctrl
23552350/**/AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2")     // VRAM 2&3 Ctrl
2356/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2357   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2351/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2352   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
23582353/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM                             // ? 0x4000
2359   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2354   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
23602355   AM_RANGE(0xb04000, 0xb13fff) AM_RAM                             //
23612356   AM_RANGE(0xe00000, 0xe03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w)   // Sound
23622357ADDRESS_MAP_END
r24055r24056
23852380   AM_RANGE(0x884000, 0x887fff) AM_RAM // tested
23862381   AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0")     // VRAM 0&1 Ctrl
23872382   AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2")     // VRAM 2&3 Ctrl
2388   AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2389   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2383   AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2384   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
23902385   AM_RANGE(0xa80000, 0xa80001) AM_RAM                             // ? $4000
2391   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2386   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
23922387   AM_RANGE(0xb04000, 0xb07fff) AM_RAM                             // tested
23932388#if __uPD71054_TIMER
23942389   AM_RANGE(0xc00000, 0xc00007) AM_WRITE(timer_regs_w)             // ?
r24055r24056
24152410   AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0")     // VRAM 0&1 Ctrl
24162411   AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2")     // VRAM 2&3 Ctrl
24172412
2418   AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2419   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2413   AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2414   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
24202415   AM_RANGE(0xa80000, 0xa80001) AM_RAM                             // ? $4000
2421   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2416   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
24222417#if __uPD71054_TIMER
24232418   AM_RANGE(0xc00000, 0xc00007) AM_WRITE(timer_regs_w)             // ?
24242419#else
r24055r24056
24612456   AM_RANGE(0x884000, 0x887fff) AM_RAM                             // tested
24622457   AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0")         // VRAM 0&1 Ctrl
24632458   AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2")         // VRAM 2&3 Ctrl
2464   AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2465   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2459   AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2460   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
24662461   AM_RANGE(0xa80000, 0xa80001) AM_RAM                             // ? $4000
2467   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2462   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
24682463   AM_RANGE(0xb04000, 0xb07fff) AM_RAM                             // tested
24692464#if __uPD71054_TIMER
24702465   AM_RANGE(0xc00000, 0xc00007) AM_WRITE(timer_regs_w)             // ?
r24055r24056
25182513   AM_RANGE(0x800100, 0x8001ff) AM_RAM                             // NVRAM
25192514   AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w)   // Sound
25202515   AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_SHARE("paletteram")  // Palette
2521   AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2516   AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
25222517/**/AM_RANGE(0xd00000, 0xd00001) AM_RAM                             // ? 0x4000
2523/**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2524   AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2518/**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2519   AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
25252520ADDRESS_MAP_END
25262521
25272522
r24055r24056
25542549   AM_RANGE(0x500000, 0x500005) AM_RAM_WRITE(msgundam_vregs_w) AM_SHARE("vregs")   // Coin Lockout + Video Registers
25552550   AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r)                // DSW
25562551   AM_RANGE(0x700400, 0x700fff) AM_RAM AM_SHARE("paletteram")  // Palette
2557   AM_RANGE(0x800000, 0x8005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2558   AM_RANGE(0x800600, 0x800607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2552   AM_RANGE(0x800000, 0x8005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2553   AM_RANGE(0x800600, 0x800607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
25592554   AM_RANGE(0x880000, 0x880001) AM_RAM                             // ? 0x4000
2560   AM_RANGE(0x900000, 0x903fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2555   AM_RANGE(0x900000, 0x903fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
25612556   AM_RANGE(0xa00000, 0xa03fff) AM_RAM_WRITE(seta_vram_0_w) AM_SHARE("vram_0") // VRAM 0&1
25622557   AM_RANGE(0xa80000, 0xa83fff) AM_RAM_WRITE(seta_vram_2_w) AM_SHARE("vram_2") // VRAM 2&3
25632558   AM_RANGE(0xb00000, 0xb00005) AM_RAM AM_SHARE("vctrl_0")     // VRAM 0&1 Ctrl
r24055r24056
25912586   AM_RANGE(0x880000, 0x883fff) AM_RAM_WRITE(seta_vram_2_w) AM_SHARE("vram_2") // VRAM 2&3
25922587/**/AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0")     // VRAM 0&1 Ctrl
25932588/**/AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2")     // VRAM 2&3 Ctrl
2594/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2595   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2589/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2590   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
25962591/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM                             // ? 0x4000
2597   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2592   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
25982593   AM_RANGE(0xc00400, 0xc00fff) AM_RAM AM_SHARE("paletteram")  // Palette
25992594ADDRESS_MAP_END
26002595
r24055r24056
26202615   AM_RANGE(0x880000, 0x883fff) AM_RAM_WRITE(seta_vram_2_w) AM_SHARE("vram_2") // VRAM 2&3
26212616/**/AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0")     // VRAM 0&1 Ctrl
26222617/**/AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2")     // VRAM 2&3 Ctrl
2623/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2624   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2618/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2619   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
26252620/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM                             // ? 0x4000
2626   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2621   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
26272622   AM_RANGE(0xc00400, 0xc00fff) AM_RAM AM_SHARE("paletteram")  // Palette
26282623ADDRESS_MAP_END
26292624
r24055r24056
26722667   AM_RANGE(0x000000, 0x07ffff) AM_ROM                             // ROM
26732668   AM_RANGE(0x200000, 0x20ffff) AM_RAM                             // RAM
26742669   AM_RANGE(0xfffc00, 0xffffff) AM_READWRITE(kiwame_nvram_r, kiwame_nvram_w) AM_SHARE("kiwame_nvram")  // NVRAM + Regs ?
2675   AM_RANGE(0x800000, 0x803fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2670   AM_RANGE(0x800000, 0x803fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
26762671/**/AM_RANGE(0x900000, 0x900001) AM_RAM                             // ? 0x4000
2677/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2678   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2672/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2673   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
26792674   AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_SHARE("paletteram")  // Palette
26802675   AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w)   // Sound
26812676   AM_RANGE(0xd00000, 0xd00009) AM_READ(kiwame_input_r)            // mahjong panel
r24055r24056
27162711   AM_RANGE(0xb00008, 0xb00009) AM_READ_PORT("P3")                 // P3 (wits)
27172712   AM_RANGE(0xb0000a, 0xb0000b) AM_READ_PORT("P4")                 // P4 (wits)
27182713/**/AM_RANGE(0xc00000, 0xc00001) AM_RAM                             // ? 0x4000
2719/**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2720   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2721   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2714/**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2715   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
2716   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
27222717   AM_RANGE(0xe04000, 0xe07fff) AM_RAM                             // (wits)
27232718ADDRESS_MAP_END
27242719
r24055r24056
27402735   AM_RANGE(0xb00008, 0xb00009) AM_READ_PORT("P3")                 // P3 (wits)
27412736   AM_RANGE(0xb0000a, 0xb0000b) AM_READ_PORT("P4")                 // P4 (wits)
27422737/**/AM_RANGE(0xc00000, 0xc00001) AM_RAM                             // ? 0x4000
2743/**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2744   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2745   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2738/**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2739   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
2740   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
27462741   AM_RANGE(0xe04000, 0xe07fff) AM_RAM                             // (wits)
27472742ADDRESS_MAP_END
27482743
r24055r24056
27782773   AM_RANGE(0xb00008, 0xb00009) AM_READ_PORT("P3")                 // P3 (wits)
27792774   AM_RANGE(0xb0000a, 0xb0000b) AM_READ_PORT("P4")                 // P4 (wits)
27802775/**/AM_RANGE(0xc00000, 0xc00001) AM_RAM                             // ? 0x4000
2781/**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2782   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2783   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2776/**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2777   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
2778   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
27842779   AM_RANGE(0xe04000, 0xe07fff) AM_RAM // (wits)
27852780ADDRESS_MAP_END
27862781
r24055r24056
28082803   AM_RANGE(0x400004, 0x400005) AM_WRITENOP                        // ? (end of lev 2)
28092804   AM_RANGE(0x500000, 0x500001) AM_RAM_WRITE(seta_vregs_w) AM_SHARE("vregs")   // Coin Lockout + Video Registers
28102805   AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r)                // DSW
2811   AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2812   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2806   AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2807   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
28132808/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM                             // ? 0x4000
2814   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2809   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
28152810   AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w)   // Sound
28162811ADDRESS_MAP_END
28172812
r24055r24056
28422837   AM_RANGE(0x880000, 0x883fff) AM_RAM_WRITE(seta_vram_2_w) AM_SHARE("vram_2") // VRAM 2&3
28432838   AM_RANGE(0x900000, 0x900005) AM_WRITEONLY AM_SHARE("vctrl_0")// VRAM 0&1 Ctrl
28442839   AM_RANGE(0x980000, 0x980005) AM_WRITEONLY AM_SHARE("vctrl_2")// VRAM 2&3 Ctrl
2845   AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2846   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2847   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2840   AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2841   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
2842   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
28482843   AM_RANGE(0xc00000, 0xc00001) AM_WRITE(utoukond_soundlatch_w)    // To Sound CPU (cause an IRQ)
28492844   AM_RANGE(0xe00000, 0xe00001) AM_WRITENOP                        // ? ack
28502845ADDRESS_MAP_END
r24055r24056
28822877   AM_RANGE(0x900000, 0x9001ff) AM_READWRITE(pairlove_prot_r,pairlove_prot_w)
28832878   AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w)   // Sound
28842879   AM_RANGE(0xb00000, 0xb00fff) AM_RAM AM_SHARE("paletteram")  // Palette
2885   AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
2880   AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     // Sprites Code + X + Attr
28862881   AM_RANGE(0xd00000, 0xd00001) AM_RAM                             // ? 0x4000
2887   AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     // Sprites Y
2888   AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2882   AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     // Sprites Y
2883   AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
28892884   AM_RANGE(0xf00000, 0xf0ffff) AM_RAM                             // RAM
28902885ADDRESS_MAP_END
28912886
r24055r24056
29112906   AM_RANGE(0x880000, 0x883fff) AM_WRITE(seta_vram_0_w) AM_SHARE("vram_0") // VRAM 0
29122907   AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_2") // VRAM 2&3 Ctrl
29132908   AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl
2914   AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
2915   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2909   AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y
2910   AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
29162911   AM_RANGE(0xa80000, 0xa80001) AM_WRITENOP    // ? 0x4000
2917   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
2912   AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
29182913ADDRESS_MAP_END
29192914
29202915
r24055r24056
29772972
29782973   AM_RANGE(0xc00000, 0xc00001) AM_RAM     // ? 0x4000
29792974
2980   AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
2981   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
2975   AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y
2976   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
29822977
2983   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
2978   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
29842979
29852980   AM_RANGE(0xffc000, 0xffffff) AM_RAM // RAM
29862981ADDRESS_MAP_END
r24055r24056
30403035
30413036   AM_RANGE(0xc00000, 0xc00001) AM_RAM     // ? 0x4000
30423037
3043   AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
3044   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
3038   AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y
3039   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
30453040
3046   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
3041   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
30473042
30483043   AM_RANGE(0xffc000, 0xffffff) AM_RAM // RAM
30493044ADDRESS_MAP_END
trunk/src/mame/drivers/srmp2.c
r24055r24056
6262#include "sound/msm5205.h"
6363#include "includes/srmp2.h"
6464#include "machine/nvram.h"
65#include "video/seta001.h"
6665
6766/***************************************************************************
6867
r24055r24056
382381static ADDRESS_MAP_START( srmp2_map, AS_PROGRAM, 16, srmp2_state )
383382   AM_RANGE(0x000000, 0x03ffff) AM_ROM
384383   AM_RANGE(0x0c0000, 0x0c3fff) AM_RAM AM_SHARE("nvram")
385   AM_RANGE(0x140000, 0x143fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16)     /* Sprites Code + X + Attr */
386   AM_RANGE(0x180000, 0x1805ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16)     /* Sprites Y */
387   AM_RANGE(0x180600, 0x180607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
384   AM_RANGE(0x140000, 0x143fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16)     /* Sprites Code + X + Attr */
385   AM_RANGE(0x180000, 0x1805ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16)     /* Sprites Y */
386   AM_RANGE(0x180600, 0x180607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
388387   AM_RANGE(0x1c0000, 0x1c0001) AM_WRITENOP                        /* ??? */
389388   AM_RANGE(0x800000, 0x800001) AM_WRITE(srmp2_flags_w)            /* ADPCM bank, Color bank, etc. */
390389   AM_RANGE(0x900000, 0x900001) AM_READ_PORT("SYSTEM")             /* Coinage */
r24055r24056
431430   AM_RANGE(0xb00000, 0xb00001) AM_DEVREAD8("aysnd", ay8910_device, data_r, 0x00ff)
432431   AM_RANGE(0xb00000, 0xb00003) AM_DEVWRITE8("aysnd", ay8910_device, address_data_w, 0x00ff)
433432   AM_RANGE(0xc00000, 0xc00001) AM_WRITENOP                    /* ??? */
434   AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) /* Sprites Y */
435   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16)
433   AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) /* Sprites Y */
434   AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
436435
437436   AM_RANGE(0xd02000, 0xd023ff) AM_RAM                         /* ??? only writes $00fa */
438   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) /* Sprites Code + X + Attr */
437   AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) /* Sprites Code + X + Attr */
439438   AM_RANGE(0xffc000, 0xffffff) AM_RAM AM_SHARE("nvram")
440439ADDRESS_MAP_END
441440
r24055r24056
463462   AM_RANGE(0x8000, 0x9fff) AM_ROMBANK("bank1")                            /* rom bank */
464463   AM_RANGE(0xa000, 0xa7ff) AM_RAM AM_SHARE("nvram")   /* work ram */
465464   AM_RANGE(0xa800, 0xa800) AM_WRITENOP                            /* flag ? */
466   AM_RANGE(0xb000, 0xb2ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r8, spriteylow_w8)
467   AM_RANGE(0xb300, 0xb303) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r8, spritectrl_w8)
465   AM_RANGE(0xb000, 0xb2ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r8, spriteylow_w8)
466   AM_RANGE(0xb300, 0xb303) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r8, spritectrl_w8)
468467   AM_RANGE(0xb800, 0xb800) AM_WRITENOP                            /* flag ? */
469   AM_RANGE(0xc000, 0xdfff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodelow_r8, spritecodelow_w8) /* Sprites Code + X + Attr */
470   AM_RANGE(0xe000, 0xffff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodehigh_r8, spritecodehigh_w8)
468   AM_RANGE(0xc000, 0xdfff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodelow_r8, spritecodelow_w8) /* Sprites Code + X + Attr */
469   AM_RANGE(0xe000, 0xffff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodehigh_r8, spritecodehigh_w8)
471470ADDRESS_MAP_END
472471
473472static ADDRESS_MAP_START( srmp3_io_map, AS_IO, 8, srmp2_state )
r24055r24056
487486   AM_RANGE(0x0000, 0x7fff) AM_ROM
488487   AM_RANGE(0x8000, 0x9fff) AM_ROMBANK("bank1")                            /* rom bank */
489488   AM_RANGE(0xa000, 0xafff) AM_RAM AM_SHARE("nvram")   /* work ram */
490   AM_RANGE(0xb000, 0xb2ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r8, spriteylow_w8)
491   AM_RANGE(0xb300, 0xb303) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r8, spritectrl_w8)
489   AM_RANGE(0xb000, 0xb2ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r8, spriteylow_w8)
490   AM_RANGE(0xb300, 0xb303) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r8, spritectrl_w8)
492491   AM_RANGE(0xb800, 0xb800) AM_WRITENOP                            /* flag ? */
493   AM_RANGE(0xc000, 0xdfff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodelow_r8, spritecodelow_w8) /* Sprites Code + X + Attr */
494   AM_RANGE(0xe000, 0xffff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodehigh_r8, spritecodehigh_w8)
492   AM_RANGE(0xc000, 0xdfff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodelow_r8, spritecodelow_w8) /* Sprites Code + X + Attr */
493   AM_RANGE(0xe000, 0xffff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodehigh_r8, spritecodehigh_w8)
495494ADDRESS_MAP_END
496495
497496WRITE8_MEMBER(srmp2_state::rmgoldyh_rombank_w)
trunk/src/mame/video/seta001.c
r24055r24056
7777{
7878}
7979
80READ16_DEVICE_HANDLER( spritectrl_r16 )
80READ16_MEMBER( seta001_device::spritectrl_r16 )
8181{
82   seta001_device *dev = (seta001_device *)device;
83   return dev->m_spritectrl[offset];
82   return m_spritectrl[offset];
8483}
8584
86WRITE16_DEVICE_HANDLER( spritectrl_w16 )
85WRITE16_MEMBER( seta001_device::spritectrl_w16 )
8786{
88   seta001_device *dev = (seta001_device *)device;
89
9087   if (ACCESSING_BITS_0_7)
9188   {
92      dev->m_spritectrl[offset] = data;
89      m_spritectrl[offset] = data;
9390   }
9491}
9592
96READ8_DEVICE_HANDLER( spritectrl_r8 )
93READ8_MEMBER( seta001_device::spritectrl_r8 )
9794{
98   seta001_device *dev = (seta001_device *)device;
99   return dev->m_spritectrl[offset];
95   return m_spritectrl[offset];
10096}
10197
102WRITE8_DEVICE_HANDLER( spritectrl_w8 )
98WRITE8_MEMBER( seta001_device::spritectrl_w8 )
10399{
104   seta001_device *dev = (seta001_device *)device;
105   dev->m_spritectrl[offset] = data;
100   m_spritectrl[offset] = data;
106101}
107102
108READ16_DEVICE_HANDLER( spriteylow_r16 )
103READ16_MEMBER( seta001_device::spriteylow_r16 )
109104{
110   seta001_device *dev = (seta001_device *)device;
111   return dev->m_spriteylow[offset];
105   return m_spriteylow[offset];
112106}
113107
114WRITE16_DEVICE_HANDLER( spriteylow_w16 )
108WRITE16_MEMBER( seta001_device::spriteylow_w16 )
115109{
116   seta001_device *dev = (seta001_device *)device;
117
118110   if (ACCESSING_BITS_0_7)
119111   {
120      dev->m_spriteylow[offset] = data;
112      m_spriteylow[offset] = data;
121113   }
122114}
123115
124READ8_DEVICE_HANDLER( spriteylow_r8 )
116READ8_MEMBER( seta001_device::spriteylow_r8 )
125117{
126   seta001_device *dev = (seta001_device *)device;
127   return dev->m_spriteylow[offset];
118   return m_spriteylow[offset];
128119}
129120
130WRITE8_DEVICE_HANDLER( spriteylow_w8 )
121WRITE8_MEMBER( seta001_device::spriteylow_w8 )
131122{
132   seta001_device *dev = (seta001_device *)device;
133   dev->m_spriteylow[offset] = data;
123   m_spriteylow[offset] = data;
134124}
135125
136126
137READ8_DEVICE_HANDLER( spritecodelow_r8 )
127READ8_MEMBER( seta001_device::spritecodelow_r8 )
138128{
139   seta001_device *dev = (seta001_device *)device;
140   return dev->m_spritecodelow[offset];
129   return m_spritecodelow[offset];
141130}
142131
143WRITE8_DEVICE_HANDLER( spritecodelow_w8 )
132WRITE8_MEMBER( seta001_device::spritecodelow_w8 )
144133{
145   seta001_device *dev = (seta001_device *)device;
146   dev->m_spritecodelow[offset] = data;
134   m_spritecodelow[offset] = data;
147135}
148136
149READ8_DEVICE_HANDLER( spritecodehigh_r8 )
137READ8_MEMBER( seta001_device::spritecodehigh_r8 )
150138{
151   seta001_device *dev = (seta001_device *)device;
152   return dev->m_spritecodehigh[offset];
139   return m_spritecodehigh[offset];
153140}
154141
155WRITE8_DEVICE_HANDLER( spritecodehigh_w8 )
142WRITE8_MEMBER( seta001_device::spritecodehigh_w8 )
156143{
157   seta001_device *dev = (seta001_device *)device;
158   dev->m_spritecodehigh[offset] = data;
144   m_spritecodehigh[offset] = data;
159145}
160146
161READ16_DEVICE_HANDLER( spritecode_r16 )
147READ16_MEMBER( seta001_device::spritecode_r16 )
162148{
163   seta001_device *dev = (seta001_device *)device;
164   UINT16 ret = dev->m_spritecodelow[offset];
165   ret |= dev->m_spritecodehigh[offset] << 8;
149   UINT16 ret = m_spritecodelow[offset];
150   ret |= m_spritecodehigh[offset] << 8;
166151   return ret;
167152}
168153
169WRITE16_DEVICE_HANDLER( spritecode_w16 )
154WRITE16_MEMBER( seta001_device::spritecode_w16 )
170155{
171   seta001_device *dev = (seta001_device *)device;
172   if (ACCESSING_BITS_0_7) dev->m_spritecodelow[offset] = data & 0x00ff;
173   if (ACCESSING_BITS_8_15)  dev->m_spritecodehigh[offset] = (data & 0xff00)>>8;
156   if (ACCESSING_BITS_0_7) m_spritecodelow[offset] = data & 0x00ff;
157   if (ACCESSING_BITS_8_15)  m_spritecodehigh[offset] = (data & 0xff00)>>8;
174158}
175159
176WRITE8_DEVICE_HANDLER( spritebgflag_w8 )
160WRITE8_MEMBER( seta001_device::spritebgflag_w8 )
177161{
178   seta001_device *dev = (seta001_device *)device;
179   dev->m_bgflag = data;
162   m_bgflag = data;
180163}
181164
182165/***************************************************************************
r24055r24056
206189
207190
208191
209void seta001_device::seta001_draw_background( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size, int setac_type)
192void seta001_device::draw_background( bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size, int setac_type)
210193{
211194   int transpen;
212195
213196   int offs, col;
214197   int xoffs, yoffs;
215198
216   int total_color_codes   =   machine.config().m_gfxdecodeinfo[0].total_color_codes;
199   int total_color_codes   =   machine().config().m_gfxdecodeinfo[0].total_color_codes;
217200
218201   int ctrl    =   m_spritectrl[0];
219202   int ctrl2   =   m_spritectrl[1];
r24055r24056
293276         color   =   ( color >> (16-5) ) % total_color_codes;
294277         code &= 0x3fff;
295278
296         drawgfx_transpen(bitmap,cliprect,machine.gfx[0],
279         drawgfx_transpen(bitmap,cliprect,machine().gfx[0],
297280               code,
298281               color,
299282               flipx,flipy,
300283               ((sx) & 0x1ff),((sy) & 0x0ff),
301284               transpen);
302285
303         drawgfx_transpen(bitmap,cliprect,machine.gfx[0],
286         drawgfx_transpen(bitmap,cliprect,machine().gfx[0],
304287               code,
305288               color,
306289               flipx,flipy,
307290               ((sx) & 0x1ff)-512,((sy) & 0x0ff),
308291               transpen);
309292
310         drawgfx_transpen(bitmap,cliprect,machine.gfx[0],
293         drawgfx_transpen(bitmap,cliprect,machine().gfx[0],
311294               code,
312295               color,
313296               flipx,flipy,
314297               ((sx) & 0x1ff),((sy) & 0x0ff)-256,
315298               transpen);
316299
317         drawgfx_transpen(bitmap,cliprect,machine.gfx[0],
300         drawgfx_transpen(bitmap,cliprect,machine().gfx[0],
318301               code,
319302               color,
320303               flipx,flipy,
r24055r24056
326309}
327310
328311
329void seta001_device::seta001_draw_foreground( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size)
312void seta001_device::draw_foreground( bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size)
330313{
331314   int screenflip = (m_spritectrl[0] & 0x40) >> 6;
332315   int i;
333316   int ctrl2 = m_spritectrl[1];
334317   int xoffs, yoffs;
335318
336   int total_color_codes   =   machine.config().m_gfxdecodeinfo[0].total_color_codes;
319   int total_color_codes   =   machine().config().m_gfxdecodeinfo[0].total_color_codes;
337320
338321   UINT8 *char_pointer = m_spritecodelow + 0x0000;
339322   UINT8 *x_pointer = m_spritecodelow + 0x0200;
r24055r24056
351334      color_pointer += bank_size;
352335   }
353336
354   int max_y = machine.primary_screen->height();
337   int max_y = machine().primary_screen->height();
355338
356339
357340   /* Draw up to 512 sprites, mjyuugi has glitches if you draw them all.. */
r24055r24056
368351      flipx = ctrl_pointer[i] & 0x80;
369352      flipy = ctrl_pointer[i] & 0x40;
370353
371      if (m_bankcallback) code = m_bankcallback(machine, code, color_pointer[i]);
354      if (m_bankcallback) code = m_bankcallback(machine(), code, color_pointer[i]);
372355
373356      color %= total_color_codes;
374357
r24055r24056
377360      if (screenflip)
378361      {
379362         sy = max_y - sy
380            +(machine.primary_screen->height() - (machine.primary_screen->visible_area().max_y + 1));
363            +(machine().primary_screen->height() - (machine().primary_screen->visible_area().max_y + 1));
381364         flipx = !flipx;
382365         flipy = !flipy;
383366      }
384367
385      drawgfx_transpen(bitmap,cliprect,machine.gfx[0],
368      drawgfx_transpen(bitmap,cliprect,machine().gfx[0],
386369            code,
387370            color,
388371            flipx,flipy,
r24055r24056
390373            max_y - ((sy + yoffs) & 0x0ff),m_transpen);
391374
392375      /* wrap around x */
393      drawgfx_transpen(bitmap,cliprect,machine.gfx[0],
376      drawgfx_transpen(bitmap,cliprect,machine().gfx[0],
394377            code,
395378            color,
396379            flipx,flipy,
r24055r24056
398381            max_y - ((sy + yoffs) & 0x0ff),m_transpen);
399382
400383
401      drawgfx_transpen(bitmap,cliprect,machine.gfx[0],
384      drawgfx_transpen(bitmap,cliprect,machine().gfx[0],
402385            code,
403386            color,
404387            flipx,flipy,
r24055r24056
406389            max_y - ((sy + yoffs) & 0x0ff)-256,m_transpen);
407390
408391      /* wrap around x */
409      drawgfx_transpen(bitmap,cliprect,machine.gfx[0],
392      drawgfx_transpen(bitmap,cliprect,machine().gfx[0],
410393            code,
411394            color,
412395            flipx,flipy,
r24055r24056
464447
465448}
466449
467void seta001_device::seta001_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size, int setac)
450void seta001_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size, int setac)
468451{
469   seta001_draw_background(machine, bitmap, cliprect, bank_size, setac);
470   seta001_draw_foreground(machine, bitmap, cliprect, bank_size);
452   draw_background(bitmap, cliprect, bank_size, setac);
453   draw_foreground(bitmap, cliprect, bank_size);
471454}
trunk/src/mame/video/seta001.h
r24055r24056
66public:
77   seta001_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
88
9   DECLARE_WRITE8_MEMBER( spritebgflag_w8 );
910
10   void seta001_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size, int setac);
11   DECLARE_READ16_MEMBER( spritectrl_r16 );
12   DECLARE_WRITE16_MEMBER( spritectrl_w16 );
13   DECLARE_READ8_MEMBER( spritectrl_r8 );
14   DECLARE_WRITE8_MEMBER( spritectrl_w8 );
1115
16   DECLARE_READ16_MEMBER( spriteylow_r16 );
17   DECLARE_WRITE16_MEMBER( spriteylow_w16 );
18   DECLARE_READ8_MEMBER( spriteylow_r8 );
19   DECLARE_WRITE8_MEMBER( spriteylow_w8 );
20
21   DECLARE_READ8_MEMBER( spritecodelow_r8 );
22   DECLARE_WRITE8_MEMBER( spritecodelow_w8 );
23   DECLARE_READ8_MEMBER( spritecodehigh_r8 );
24   DECLARE_WRITE8_MEMBER( spritecodehigh_w8 );
25   DECLARE_READ16_MEMBER( spritecode_r16 );
26   DECLARE_WRITE16_MEMBER( spritecode_w16 );
27   
28   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size, int setac);
29
1230   void setac_eof( void );
1331   void tnzs_eof( void );
1432
r24055r24056
5270
5371private:
5472
55   void seta001_draw_background( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size, int setac_type);
56   void seta001_draw_foreground( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size);
73   void draw_background( bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size, int setac_type);
74   void draw_foreground( bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size);
5775
5876};
5977
60DECLARE_WRITE8_DEVICE_HANDLER( spritebgflag_w8 );
61
62
63DECLARE_READ16_DEVICE_HANDLER( spritectrl_r16 );
64DECLARE_WRITE16_DEVICE_HANDLER( spritectrl_w16 );
65DECLARE_READ8_DEVICE_HANDLER( spritectrl_r8 );
66DECLARE_WRITE8_DEVICE_HANDLER( spritectrl_w8 );
67
68DECLARE_READ16_DEVICE_HANDLER( spriteylow_r16 );
69DECLARE_WRITE16_DEVICE_HANDLER( spriteylow_w16 );
70DECLARE_READ8_DEVICE_HANDLER( spriteylow_r8 );
71DECLARE_WRITE8_DEVICE_HANDLER( spriteylow_w8 );
72
73DECLARE_READ8_DEVICE_HANDLER( spritecodelow_r8 );
74DECLARE_WRITE8_DEVICE_HANDLER( spritecodelow_w8 );
75DECLARE_READ8_DEVICE_HANDLER( spritecodehigh_r8 );
76DECLARE_WRITE8_DEVICE_HANDLER( spritecodehigh_w8 );
77DECLARE_READ16_DEVICE_HANDLER( spritecode_r16 );
78DECLARE_WRITE16_DEVICE_HANDLER( spritecode_w16 );
79
8078extern const device_type SETA001_SPRITE;
trunk/src/mame/video/seta.c
r24055r24056
138138#include "emu.h"
139139#include "sound/x1_010.h"
140140#include "includes/seta.h"
141#include "video/seta001.h"
142141
143142/* note that drgnunit, stg and qzkklogy run on the same board, yet they need different alignment */
144143static const game_offset game_offsets[] =
r24055r24056
474473   m_tilemaps_flip = 1;
475474
476475   // position kludges
477   machine().device<seta001_device>("spritegen")->set_fg_yoffsets( -0x12, 0x0e );
476   m_seta001->set_fg_yoffsets( -0x12, 0x0e );
478477}
479478
480479
r24055r24056
504503   VIDEO_START_CALL_MEMBER(seta_1_layer);
505504
506505   // position kludges
507   machine().device<seta001_device>("spritegen")->set_fg_yoffsets( -0x12, 0x0e );
508   machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x1, -0x1 );
506   m_seta001->set_fg_yoffsets( -0x12, 0x0e );
507   m_seta001->set_bg_yoffsets( 0x1, -0x1 );
509508}
510509
511510VIDEO_START_MEMBER(seta_state,twineagl_1_layer)
r24055r24056
550549   m_samples_bank = -1;    // set the samples bank to an out of range value at start-up
551550
552551   // position kludges
553   machine().device<seta001_device>("spritegen")->set_fg_xoffsets(m_global_offsets->sprite_offs[1], m_global_offsets->sprite_offs[0]);
554   machine().device<seta001_device>("spritegen")->set_fg_yoffsets( -0x0a, 0x0e );
552   m_seta001->set_fg_xoffsets(m_global_offsets->sprite_offs[1], m_global_offsets->sprite_offs[0]);
553   m_seta001->set_fg_yoffsets( -0x0a, 0x0e );
555554
556555   // banking
557   machine().device<seta001_device>("spritegen")->set_gfxbank_callback( setac_gfxbank_callback );
556   m_seta001->set_gfxbank_callback( setac_gfxbank_callback );
558557
559558}
560559
r24055r24056
830829   set_pens();
831830   bitmap.fill(0x1f0, cliprect);
832831
833   machine().device<seta001_device>("spritegen")->seta001_draw_sprites(machine(),bitmap,cliprect,0x1000, 1);
832   m_seta001->draw_sprites(bitmap,cliprect,0x1000, 1);
834833   return 0;
835834}
836835
r24055r24056
842841   int enab_0, enab_1, x_0, x_1=0, y_0, y_1=0;
843842
844843   int order   =   0;
845   int flip    =   machine().device<seta001_device>("spritegen")->is_flipped();
844   int flip    =   m_seta001->is_flipped();
846845
847846   const rectangle &visarea = screen.visible_area();
848847   int vis_dimy = visarea.max_y - visarea.min_y + 1;
r24055r24056
952951
953952      if (order & 2)  // layer-sprite priority?
954953      {
955         if (layers_ctrl & 8)        screen.machine().device<seta001_device>("spritegen")->seta001_draw_sprites(screen.machine(),bitmap,cliprect,sprite_bank_size, sprite_setac);
954         if (layers_ctrl & 8)        m_seta001->draw_sprites(bitmap,cliprect,sprite_bank_size, sprite_setac);
956955
957956         if(order & 4)
958957         {
r24055r24056
972971         if (layers_ctrl & 1)    m_tilemap_0->draw(bitmap, cliprect, 0, 0);
973972         if (layers_ctrl & 1)    m_tilemap_1->draw(bitmap, cliprect, 0, 0);
974973
975         if (layers_ctrl & 8)        machine().device<seta001_device>("spritegen")->seta001_draw_sprites(screen.machine(),bitmap,cliprect,sprite_bank_size, sprite_setac);
974         if (layers_ctrl & 8)        m_seta001->draw_sprites(bitmap,cliprect,sprite_bank_size, sprite_setac);
976975      }
977976   }
978977   else
r24055r24056
982981
983982      if (order & 2)  // layer-sprite priority?
984983      {
985         if (layers_ctrl & 8)        machine().device<seta001_device>("spritegen")->seta001_draw_sprites(screen.machine(),bitmap,cliprect,sprite_bank_size, sprite_setac);
984         if (layers_ctrl & 8)        m_seta001->draw_sprites(bitmap,cliprect,sprite_bank_size, sprite_setac);
986985
987986         if((order & 4) && m_paletteram2 != NULL)
988987         {
r24055r24056
10361035            }
10371036         }
10381037
1039         if (layers_ctrl & 8) machine().device<seta001_device>("spritegen")->seta001_draw_sprites(screen.machine(),bitmap,cliprect,sprite_bank_size, sprite_setac);
1038         if (layers_ctrl & 8) m_seta001->draw_sprites(bitmap,cliprect,sprite_bank_size, sprite_setac);
10401039      }
10411040   }
10421041
r24055r24056
10621061{
10631062   // rising edge
10641063   if (state)
1065      machine().device<seta001_device>("spritegen")->tnzs_eof();
1064      m_seta001->tnzs_eof();
10661065}
10671066
10681067
trunk/src/mame/video/tnzs.c
r24055r24056
88
99#include "emu.h"
1010#include "includes/tnzs.h"
11#include "video/seta001.h"
1211
1312/***************************************************************************
1413
r24055r24056
4746{
4847   bitmap.fill(0x1f0, cliprect);
4948
50   machine().device<seta001_device>("spritegen")->set_fg_yoffsets( -0x12, 0x0e );
51   machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x1, -0x1 );
49   m_seta001->set_fg_yoffsets( -0x12, 0x0e );
50   m_seta001->set_bg_yoffsets( 0x1, -0x1 );
5251
53   machine().device<seta001_device>("spritegen")->seta001_draw_sprites(machine(), bitmap, cliprect, 0x800, 0 );
52   m_seta001->draw_sprites(bitmap, cliprect, 0x800, 0 );
5453   return 0;
5554}
5655
r24055r24056
5857{
5958   // rising edge
6059   if (state)
61      machine().device<seta001_device>("spritegen")->tnzs_eof();
60      m_seta001->tnzs_eof();
6261}
trunk/src/mame/video/srmp2.c
r24055r24056
77
88#include "emu.h"
99#include "includes/srmp2.h"
10#include "video/seta001.h"
1110
1211PALETTE_INIT_MEMBER(srmp2_state,srmp2)
1312{
r24055r24056
5655{
5756   bitmap.fill(0x1ff, cliprect);
5857
59   machine().device<seta001_device>("spritegen")->set_transpen(15);
58   m_seta001->set_transpen(15);
6059
61   machine().device<seta001_device>("spritegen")->set_colorbase((m_color_bank)?0x20:0x00);
60   m_seta001->set_colorbase((m_color_bank)?0x20:0x00);
6261
63   machine().device<seta001_device>("spritegen")->set_fg_xoffsets( 0x10, 0x10 );
64   machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x05, 0x07 );
65   machine().device<seta001_device>("spritegen")->set_bg_xoffsets( 0x00, 0x00 ); // bg not used?
66   machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x00, 0x00 ); // bg not used?
62   m_seta001->set_fg_xoffsets( 0x10, 0x10 );
63   m_seta001->set_fg_yoffsets( 0x05, 0x07 );
64   m_seta001->set_bg_xoffsets( 0x00, 0x00 ); // bg not used?
65   m_seta001->set_bg_yoffsets( 0x00, 0x00 ); // bg not used?
6766
68   machine().device<seta001_device>("spritegen")->seta001_draw_sprites(machine(),bitmap,cliprect,0x1000, 1);
67   m_seta001->draw_sprites(bitmap,cliprect,0x1000, 1);
6968   return 0;
7069}
7170
r24055r24056
7372{
7473   bitmap.fill(0x1f0, cliprect);
7574
76   machine().device<seta001_device>("spritegen")->set_fg_xoffsets( 0x10, 0x10 );
77   machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x06, 0x06 );
78   machine().device<seta001_device>("spritegen")->set_bg_xoffsets( -0x01, 0x10 );
79   machine().device<seta001_device>("spritegen")->set_bg_yoffsets( -0x06, 0x06 );
75   m_seta001->set_fg_xoffsets( 0x10, 0x10 );
76   m_seta001->set_fg_yoffsets( 0x06, 0x06 );
77   m_seta001->set_bg_xoffsets( -0x01, 0x10 );
78   m_seta001->set_bg_yoffsets( -0x06, 0x06 );
8079
81   machine().device<seta001_device>("spritegen")->set_gfxbank_callback( srmp3_gfxbank_callback );
80   m_seta001->set_gfxbank_callback( srmp3_gfxbank_callback );
8281
83   machine().device<seta001_device>("spritegen")->seta001_draw_sprites(machine(),bitmap,cliprect,0x1000, 1);
82   m_seta001->draw_sprites(bitmap,cliprect,0x1000, 1);
8483   return 0;
8584}
8685
r24055r24056
8887{
8988   bitmap.fill(0x1f0, cliprect);
9089
91   machine().device<seta001_device>("spritegen")->set_fg_xoffsets( 0x10, 0x10 );
92   machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x06, 0x06 );
93   machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x09, 0x07 );
90   m_seta001->set_fg_xoffsets( 0x10, 0x10 );
91   m_seta001->set_fg_yoffsets( 0x06, 0x06 );
92   m_seta001->set_bg_yoffsets( 0x09, 0x07 );
9493
95   machine().device<seta001_device>("spritegen")->set_spritelimit( 0x1ff-6 );
94   m_seta001->set_spritelimit( 0x1ff-6 );
9695
97   machine().device<seta001_device>("spritegen")->set_gfxbank_callback( srmp3_gfxbank_callback );
96   m_seta001->set_gfxbank_callback( srmp3_gfxbank_callback );
9897
99   machine().device<seta001_device>("spritegen")->seta001_draw_sprites(machine(),bitmap,cliprect,0x1000, 1);
98   m_seta001->draw_sprites(bitmap,cliprect,0x1000, 1);
10099   return 0;
101100}
trunk/src/mame/includes/seta.h
r24055r24056
44
55***************************************************************************/
66
7#include "video/seta001.h"
8
79#define __uPD71054_TIMER    1
810
911struct uPD71054_state
r24055r24056
3032      m_maincpu(*this,"maincpu"),
3133      m_audiocpu(*this, "audiocpu"),
3234      m_subcpu(*this,"sub"),
35      m_seta001(*this, "spritegen"),
3336      m_sharedram(*this,"sharedram"),
3437      m_workram(*this,"workram"),
3538      m_vregs(*this,"vregs"),
r24055r24056
4649   required_device<cpu_device> m_maincpu;
4750   optional_device<cpu_device> m_audiocpu;
4851   optional_device<cpu_device> m_subcpu;
52   required_device<seta001_device> m_seta001;
4953
5054   optional_shared_ptr<UINT8> m_sharedram;
5155   optional_shared_ptr<UINT16> m_workram;
trunk/src/mame/includes/tnzs.h
r24055r24056
11#include "sound/dac.h"
22#include "sound/samples.h"
3#include "video/seta001.h"
34
45#define MAX_SAMPLES 0x2f        /* max samples */
56
r24055r24056
2627      m_subcpu(*this, "sub"),
2728      m_mcu(*this, "mcu"),
2829      m_maincpu(*this, "maincpu"),
30      m_seta001(*this, "spritegen"),
2931      m_dac(*this, "dac"),
3032      m_samples(*this, "samples") { }
3133
r24055r24056
113115   void mcu_handle_coins( int coin );
114116   DECLARE_WRITE_LINE_MEMBER(irqhandler);
115117   required_device<cpu_device> m_maincpu;
118   optional_device<seta001_device> m_seta001;
116119   optional_device<dac_device> m_dac;
117120   optional_device<samples_device> m_samples;
118121};
trunk/src/mame/includes/srmp2.h
r24055r24056
11#include "sound/msm5205.h"
2#include "video/seta001.h"
23
34struct iox_t
45{
r24055r24056
1415   srmp2_state(const machine_config &mconfig, device_type type, const char *tag)
1516      : driver_device(mconfig, type, tag) ,
1617      m_maincpu(*this, "maincpu"),
18      m_seta001(*this, "spritegen"),
1719      m_msm(*this, "msm") { }
1820
1921   int m_color_bank;
r24055r24056
5658   UINT8 iox_key_matrix_calc(UINT8 p_side);
5759   DECLARE_WRITE_LINE_MEMBER(srmp2_adpcm_int);
5860   required_device<cpu_device> m_maincpu;
61   required_device<seta001_device> m_seta001;
5962   required_device<msm5205_device> m_msm;
6063};

Previous 199869 Revisions Next


© 1997-2024 The MAME Team