Skip to content

Commit

Permalink
igs/igs_m027_023vid.cpp, igs/pgm.cpp: removed unneeded trampoline
Browse files Browse the repository at this point in the history
  • Loading branch information
Osso13 committed Oct 18, 2024
1 parent 16a5e4e commit 4c8c9e5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 27 deletions.
15 changes: 4 additions & 11 deletions src/mame/igs/igs_m027_023vid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Main components for the PCB-0457-03-GS are:
#include "machine/nvram.h"
#include "machine/ticket.h"
#include "machine/timer.h"

#include "sound/ics2115.h"

#include "emupal.h"
Expand Down Expand Up @@ -110,7 +109,6 @@ class igs_m027_023vid_state : public driver_device

TIMER_DEVICE_CALLBACK_MEMBER(interrupt);

u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
u16 sprites_r(offs_t offset);
void screen_vblank(int state);

Expand Down Expand Up @@ -148,17 +146,12 @@ void igs_m027_023vid_state::machine_reset()
}


u32 igs_m027_023vid_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
return m_video->screen_update(screen, bitmap, cliprect);
}

void igs_m027_023vid_state::screen_vblank(int state)
{
// rising edge
if (state)
{
/* first 0xa00 of main ram = sprites, seems to be buffered, DMA? */
// first 0xa00 of main ram = sprites, seems to be buffered, DMA?
m_video->get_sprites();
}
}
Expand Down Expand Up @@ -344,7 +337,7 @@ void igs_m027_023vid_state::gpio_out_w(u8 data)

TIMER_DEVICE_CALLBACK_MEMBER(igs_m027_023vid_state::interrupt)
{
int scanline = param;
int const scanline = param;

switch (scanline)
{
Expand All @@ -365,7 +358,7 @@ u16 igs_m027_023vid_state::sprites_r(offs_t offset)
// it is also copied to a secondary RAM area, which seems to be our datasource in this case

address_space &mem = m_maincpu->space(AS_PROGRAM);
u16 sprdata = mem.read_word(0x28000000 + offset * 2);
u16 const sprdata = mem.read_word(0x28000000 + offset * 2);
return sprdata;
}

Expand Down Expand Up @@ -404,7 +397,7 @@ void igs_m027_023vid_state::m027_023vid(machine_config &config)
m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(1000));
m_screen->set_size(512, 256);
m_screen->set_visarea(0, 448-1, 0, 224-1);
m_screen->set_screen_update(FUNC(igs_m027_023vid_state::screen_update));
m_screen->set_screen_update(m_video, FUNC(igs023_video_device::screen_update));
m_screen->set_palette(m_palette);
m_screen->screen_vblank().set(FUNC(igs_m027_023vid_state::screen_vblank));

Expand Down
7 changes: 1 addition & 6 deletions src/mame/igs/pgm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,11 +457,6 @@ void pgm_state::video_start()
{
}

u32 pgm_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
return m_video->screen_update(screen, bitmap, cliprect);
}

void pgm_state::screen_vblank(int state)
{
// rising edge
Expand Down Expand Up @@ -493,7 +488,7 @@ void pgm_state::pgmbase(machine_config &config)
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_raw(50_MHz_XTAL/5, 640, 0, 448, 264, 0, 224); // or 20MHz / 2? framerate verified
screen.set_screen_update(FUNC(pgm_state::screen_update));
screen.set_screen_update(m_video, FUNC(igs023_video_device::screen_update));
screen.screen_vblank().set(FUNC(pgm_state::screen_vblank));
screen.set_palette(m_palette);

Expand Down
17 changes: 7 additions & 10 deletions src/mame/igs/pgm.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "machine/timer.h"
#include "machine/v3021.h"
#include "sound/ics2115.h"

#include "emupal.h"
#include "tilemap.h"

Expand Down Expand Up @@ -54,36 +55,35 @@ class pgm_state : public driver_device
virtual void machine_reset() override ATTR_COLD;
virtual void video_start() override ATTR_COLD;

/* memory pointers */
// memory pointers
required_shared_ptr<u16> m_mainram;

optional_ioport m_region;
optional_ioport m_regionhack;

/* devices */
// devices
required_device<cpu_device> m_maincpu;

/* hack */
// hack
int m_irq4_disabled = 0;

void pgm_base_mem(address_map &map) ATTR_COLD;
void pgm_mem(address_map &map) ATTR_COLD;

private:
/* memory pointers */
// memory pointers
required_shared_ptr<u8> m_z80_mainram;



/* devices */
// devices
required_device<cpu_device> m_soundcpu;
required_device<palette_device> m_palette;
required_device<generic_latch_8_device> m_soundlatch;
required_device<generic_latch_8_device> m_soundlatch3;
required_device<ics2115_device> m_ics;
required_device<igs023_video_device> m_video;

/* used by rendering */
void coin_counter_w(u16 data);
u8 z80_ram_r(offs_t offset);
void z80_ram_w(offs_t offset, u8 data);
Expand All @@ -92,7 +92,6 @@ class pgm_state : public driver_device
void m68k_l1_w(u8 data);
void z80_l3_w(u8 data);

u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void screen_vblank(int state);
TIMER_DEVICE_CALLBACK_MEMBER(interrupt);
u16 sprites_r(offs_t offset);
Expand All @@ -104,10 +103,8 @@ class pgm_state : public driver_device



/*----------- defined in drivers/pgm.cpp -----------*/
//----------- defined in igs/pgm.cpp -----------

INPUT_PORTS_EXTERN(pgm);

extern gfx_decode_entry const gfx_pgm[];

#endif // MAME_IGS_PGM_H

0 comments on commit 4c8c9e5

Please sign in to comment.