~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to src/mame/drivers/ltcasino.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Emmanuel Kasper, Jordi Mallach
  • Date: 2012-06-05 20:02:23 UTC
  • mfrom: (0.3.1) (0.1.4)
  • Revision ID: package-import@ubuntu.com-20120605200223-gnlpogjrg6oqe9md
Tags: 0.146-1
[ Emmanuel Kasper ]
* New upstream release
* Drop patch to fix man pages section and patches to link with flac 
  and jpeg system lib: all this has been pushed upstream by Cesare Falco
* Add DM-Upload-Allowed: yes field.

[ Jordi Mallach ]
* Create a "gnu" TARGETOS stanza that defines NO_AFFINITY_NP.
* Stop setting TARGETOS to "unix" in d/rules. It should be autodetected,
  and set to the appropriate value.
* mame_manpage_section.patch: Change mame's manpage section to 6 (games),
  in the TH declaration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
{
23
23
public:
24
24
        ltcasino_state(const machine_config &mconfig, device_type type, const char *tag)
25
 
                : driver_device(mconfig, type, tag) { }
 
25
                : driver_device(mconfig, type, tag) ,
 
26
                m_tile_num_ram(*this, "tile_nuram"),
 
27
                m_tile_atr_ram(*this, "tile_atr_ram"){ }
26
28
 
27
 
        UINT8 *m_tile_num_ram;
28
 
        UINT8 *m_tile_atr_ram;
 
29
        required_shared_ptr<UINT8> m_tile_num_ram;
 
30
        required_shared_ptr<UINT8> m_tile_atr_ram;
29
31
        tilemap_t *m_tilemap;
 
32
        DECLARE_WRITE8_MEMBER(ltcasino_tile_num_w);
 
33
        DECLARE_WRITE8_MEMBER(ltcasino_tile_atr_w);
30
34
};
31
35
 
32
36
 
52
56
}
53
57
 
54
58
 
55
 
static WRITE8_HANDLER( ltcasino_tile_num_w )
56
 
{
57
 
        ltcasino_state *state = space->machine().driver_data<ltcasino_state>();
58
 
        state->m_tile_num_ram[offset] = data;
59
 
        state->m_tilemap->mark_tile_dirty(offset);
60
 
}
61
 
 
62
 
static WRITE8_HANDLER( ltcasino_tile_atr_w )
63
 
{
64
 
        ltcasino_state *state = space->machine().driver_data<ltcasino_state>();
65
 
        state->m_tile_atr_ram[offset] = data;
66
 
        state->m_tilemap->mark_tile_dirty(offset);
67
 
}
68
 
 
69
 
 
70
 
static ADDRESS_MAP_START( ltcasino_map, AS_PROGRAM, 8 )
 
59
WRITE8_MEMBER(ltcasino_state::ltcasino_tile_num_w)
 
60
{
 
61
        m_tile_num_ram[offset] = data;
 
62
        m_tilemap->mark_tile_dirty(offset);
 
63
}
 
64
 
 
65
WRITE8_MEMBER(ltcasino_state::ltcasino_tile_atr_w)
 
66
{
 
67
        m_tile_atr_ram[offset] = data;
 
68
        m_tilemap->mark_tile_dirty(offset);
 
69
}
 
70
 
 
71
 
 
72
static ADDRESS_MAP_START( ltcasino_map, AS_PROGRAM, 8, ltcasino_state )
71
73
        AM_RANGE(0x0000, 0x7fff) AM_RAM
72
74
        AM_RANGE(0x8000, 0xcfff) AM_ROM
73
 
        AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(ltcasino_tile_num_w) AM_BASE_MEMBER(ltcasino_state, m_tile_num_ram)
 
75
        AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(ltcasino_tile_num_w) AM_SHARE("tile_nuram")
74
76
        AM_RANGE(0xd800, 0xdfff) AM_RAM
75
 
        AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(ltcasino_tile_atr_w) AM_BASE_MEMBER(ltcasino_state, m_tile_atr_ram)
 
77
        AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(ltcasino_tile_atr_w) AM_SHARE("tile_atr_ram")
76
78
        AM_RANGE(0xe800, 0xebff) AM_RAM
77
79
 
78
80
        AM_RANGE(0xec00, 0xec00) AM_READ_PORT("IN0")
82
84
        AM_RANGE(0xec10, 0xec10) AM_READ_PORT("IN4")
83
85
        AM_RANGE(0xec12, 0xec12) AM_READ_PORT("IN5")
84
86
 
85
 
        AM_RANGE(0xec20, 0xec20) AM_DEVREAD("aysnd", ay8910_r)
 
87
        AM_RANGE(0xec20, 0xec20) AM_DEVREAD_LEGACY("aysnd", ay8910_r)
86
88
        AM_RANGE(0xec21, 0xec21) AM_READ_PORT("BUTTONS") //ltcasino -> pc: F3F3 (A in service) and F3FD (B in service)
87
 
        AM_RANGE(0xec20, 0xec21) AM_DEVWRITE("aysnd", ay8910_data_address_w)
 
89
        AM_RANGE(0xec20, 0xec21) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w)
88
90
        AM_RANGE(0xec3e, 0xec3e) AM_READNOP //not used
89
91
        AM_RANGE(0xec30, 0xec3f) AM_RAM
90
92
        AM_RANGE(0xf000, 0xffff) AM_ROM
710
712
static DRIVER_INIT(mv4in1)
711
713
{
712
714
        int i;
713
 
        UINT8 *rom = machine.region("maincpu")->base();
 
715
        UINT8 *rom = machine.root_device().memregion("maincpu")->base();
714
716
        for(i=0;i<0x10000;i++)
715
717
                rom[i]=BITSWAP8(rom[i],7,6,5,4,3,1,2,0);
716
718
}
718
720
 
719
721
 
720
722
GAME( 1982, ltcasino, 0, ltcasino, ltcasino, 0, ROT0, "Digital Controls Inc.", "Little Casino (older)", GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS  )
721
 
GAME( 1983, mv4in1,  ltcasino,  ltcasino, mv4in1, mv4in1, ROT0, "Entertainment Enterprises", "Mini Vegas 4in1", GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS )
 
723
GAME( 1983, mv4in1,  ltcasino,  ltcasino, mv4in1, mv4in1, ROT0, "Entertainment Enterprises, Ltd.", "Mini Vegas 4in1", GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS )
722
724
GAME( 1984, ltcasinn, 0, ltcasino, ltcasinn, 0, ROT0, "Digital Controls Inc.", "Little Casino (newer)", GAME_NOT_WORKING )