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

« back to all changes in this revision

Viewing changes to src/mame/video/naughtyb.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:
58
58
 
59
59
PALETTE_INIT( naughtyb )
60
60
{
 
61
        const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
61
62
        static const int resistances[2] = { 270, 130 };
62
63
        double weights[2];
63
64
        int i;
110
111
 
111
112
 
112
113
 
113
 
WRITE8_HANDLER( naughtyb_videoreg_w )
 
114
WRITE8_MEMBER(naughtyb_state::naughtyb_videoreg_w)
114
115
{
115
 
        naughtyb_state *state = space->machine().driver_data<naughtyb_state>();
116
116
        // bits 4+5 control the sound circuit
117
 
        pleiads_sound_control_c_w(space->machine().device("cust"),offset,data);
 
117
        pleiads_sound_control_c_w(machine().device("cust"),offset,data);
118
118
 
119
 
        state->m_cocktail =
120
 
                ( ( input_port_read(space->machine(), "DSW0") & 0x80 ) &&       // cabinet == cocktail
 
119
        m_cocktail =
 
120
                ( ( ioport("DSW0")->read() & 0x80 ) &&  // cabinet == cocktail
121
121
                  ( data & 0x01 ) );                            // handling player 2
122
 
        state->m_palreg  = (data >> 1) & 0x03;                  // palette sel is bit 1 & 2
123
 
        state->m_bankreg = (data >> 2) & 0x01;                  // banksel is just bit 2
 
122
        m_palreg  = (data >> 1) & 0x03;                 // palette sel is bit 1 & 2
 
123
        m_bankreg = (data >> 2) & 0x01;                 // banksel is just bit 2
124
124
}
125
125
 
126
 
WRITE8_HANDLER( popflame_videoreg_w )
 
126
WRITE8_MEMBER(naughtyb_state::popflame_videoreg_w)
127
127
{
128
 
        naughtyb_state *state = space->machine().driver_data<naughtyb_state>();
129
128
        // bits 4+5 control the sound circuit
130
 
        pleiads_sound_control_c_w(space->machine().device("cust"),offset,data);
 
129
        pleiads_sound_control_c_w(machine().device("cust"),offset,data);
131
130
 
132
 
        state->m_cocktail =
133
 
                ( ( input_port_read(space->machine(), "DSW0") & 0x80 ) &&       // cabinet == cocktail
 
131
        m_cocktail =
 
132
                ( ( ioport("DSW0")->read() & 0x80 ) &&  // cabinet == cocktail
134
133
                  ( data & 0x01 ) );                            // handling player 2
135
 
        state->m_palreg  = (data >> 1) & 0x03;                  // palette sel is bit 1 & 2
136
 
        state->m_bankreg = (data >> 3) & 0x01;                  // banksel is just bit 3
 
134
        m_palreg  = (data >> 1) & 0x03;                 // palette sel is bit 1 & 2
 
135
        m_bankreg = (data >> 3) & 0x01;                 // banksel is just bit 3
137
136
}
138
137
 
139
138