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

« back to all changes in this revision

Viewing changes to src/mame/video/turbo.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:
202
202
 *
203
203
 *************************************/
204
204
 
205
 
WRITE8_HANDLER( turbo_videoram_w )
 
205
WRITE8_MEMBER(turbo_state::turbo_videoram_w)
206
206
{
207
 
        turbo_state *state = space->machine().driver_data<turbo_state>();
208
 
        state->m_videoram[offset] = data;
 
207
        m_videoram[offset] = data;
209
208
        if (offset < 0x400)
210
209
        {
211
 
                space->machine().primary_screen->update_partial(space->machine().primary_screen->vpos());
212
 
                state->m_fg_tilemap->mark_tile_dirty(offset);
 
210
                machine().primary_screen->update_partial(machine().primary_screen->vpos());
 
211
                m_fg_tilemap->mark_tile_dirty(offset);
213
212
        }
214
213
}
215
214
 
216
215
 
217
 
WRITE8_HANDLER( buckrog_bitmap_w )
 
216
WRITE8_MEMBER(turbo_state::buckrog_bitmap_w)
218
217
{
219
 
        turbo_state *state = space->machine().driver_data<turbo_state>();
220
 
        state->m_buckrog_bitmap_ram[offset] = data & 1;
 
218
        m_buckrog_bitmap_ram[offset] = data & 1;
221
219
}
222
220
 
223
221
 
285
283
 
286
284
static void turbo_prepare_sprites(running_machine &machine, turbo_state *state, UINT8 y, sprite_info *info)
287
285
{
288
 
        const UINT8 *pr1119 = machine.region("proms")->base() + 0x200;
 
286
        const UINT8 *pr1119 = machine.root_device().memregion("proms")->base() + 0x200;
289
287
        int sprnum;
290
288
 
291
289
        /* initialize the line enable signals to 0 */
343
341
                    VR1 = 310 Ohm
344
342
                    VR2 = 910 Ohm
345
343
            */
346
 
                        info->step[level] = sprite_xscale(xscale, 1.0e3 * input_port_read(machine, "VR1") / 100.0, 1.0e3 * input_port_read(machine, "VR2") / 100.0, 100e-12);
 
344
                        info->step[level] = sprite_xscale(xscale, 1.0e3 * machine.root_device().ioport("VR1")->read() / 100.0, 1.0e3 * machine.root_device().ioport("VR2")->read() / 100.0, 100e-12);
347
345
                }
348
346
        }
349
347
}
351
349
 
352
350
static UINT32 turbo_get_sprite_bits(running_machine &machine, UINT8 road, sprite_info *sprinfo)
353
351
{
354
 
        const UINT8 *sprite_gfxdata = machine.region("gfx1")->base();
 
352
        const UINT8 *sprite_gfxdata = machine.root_device().memregion("gfx1")->base();
355
353
        UINT8 sprlive = sprinfo->lst;
356
354
        UINT32 sprdata = 0;
357
355
        int level;
408
406
{
409
407
        turbo_state *state = screen.machine().driver_data<turbo_state>();
410
408
        bitmap_ind16 &fgpixmap = state->m_fg_tilemap->pixmap();
411
 
        const UINT8 *road_gfxdata = screen.machine().region("gfx3")->base();
412
 
        const UINT8 *prom_base = screen.machine().region("proms")->base();
 
409
        const UINT8 *road_gfxdata = screen.machine().root_device().memregion("gfx3")->base();
 
410
        const UINT8 *prom_base = state->memregion("proms")->base();
413
411
        const UINT8 *pr1114 = prom_base + 0x000;
414
412
        const UINT8 *pr1115 = prom_base + 0x020;
415
413
        const UINT8 *pr1116 = prom_base + 0x040;
644
642
 
645
643
static void subroc3d_prepare_sprites(running_machine &machine, turbo_state *state, UINT8 y, sprite_info *info)
646
644
{
647
 
        const UINT8 *pr1449 = machine.region("proms")->base() + 0x300;
 
645
        const UINT8 *pr1449 = machine.root_device().memregion("proms")->base() + 0x300;
648
646
        int sprnum;
649
647
 
650
648
        /* initialize the line enable signals to 0 */
710
708
       end is in bit 1, plb in bit 0
711
709
    */
712
710
        static const UINT8 plb_end[16] = { 0,1,1,2, 1,1,1,1, 1,1,1,1, 0,1,1,2 };
713
 
        const UINT8 *sprite_gfxdata = machine.region("gfx1")->base();
 
711
        const UINT8 *sprite_gfxdata = machine.root_device().memregion("gfx1")->base();
714
712
        UINT32 sprdata = 0;
715
713
        int level;
716
714
 
763
761
{
764
762
        turbo_state *state = screen.machine().driver_data<turbo_state>();
765
763
        bitmap_ind16 &fgpixmap = state->m_fg_tilemap->pixmap();
766
 
        const UINT8 *prom_base = screen.machine().region("proms")->base();
 
764
        const UINT8 *prom_base = state->memregion("proms")->base();
767
765
        const UINT8 *pr1419 = prom_base + 0x000;
768
766
        const UINT8 *pr1620 = prom_base + 0x200;
769
767
        const UINT8 *pr1450 = prom_base + 0x500;
863
861
 
864
862
static void buckrog_prepare_sprites(running_machine &machine, turbo_state *state, UINT8 y, sprite_info *info)
865
863
{
866
 
        const UINT8 *pr5196 = machine.region("proms")->base() + 0x100;
 
864
        const UINT8 *pr5196 = machine.root_device().memregion("proms")->base() + 0x100;
867
865
        int sprnum;
868
866
 
869
867
        /* initialize the line enable signals to 0 */
930
928
       end is in bit 1, plb in bit 0
931
929
    */
932
930
        static const UINT8 plb_end[16] = { 0,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,2 };
933
 
        const UINT8 *sprite_gfxdata = machine.region("gfx1")->base();
 
931
        const UINT8 *sprite_gfxdata = machine.root_device().memregion("gfx1")->base();
934
932
        UINT32 sprdata = 0;
935
933
        int level;
936
934
 
983
981
{
984
982
        turbo_state *state = screen.machine().driver_data<turbo_state>();
985
983
        bitmap_ind16 &fgpixmap = state->m_fg_tilemap->pixmap();
986
 
        const UINT8 *bgcolor = screen.machine().region("gfx3")->base();
987
 
        const UINT8 *prom_base = screen.machine().region("proms")->base();
 
984
        const UINT8 *bgcolor = screen.machine().root_device().memregion("gfx3")->base();
 
985
        const UINT8 *prom_base = state->memregion("proms")->base();
988
986
        const UINT8 *pr5194 = prom_base + 0x000;
989
987
        const UINT8 *pr5198 = prom_base + 0x500;
990
988
        const UINT8 *pr5199 = prom_base + 0x700;