Handled single screen at 60 FPS, nw

This commit is contained in:
angelosa 2015-12-07 21:55:08 +01:00
parent 260f824762
commit 2e483cb32c
3 changed files with 22 additions and 7 deletions

View File

@ -161,10 +161,7 @@ INTERRUPT_GEN_MEMBER(rungun_state::rng_interrupt)
{ {
// send to sprite device current state (i.e. bread & butter sprite DMA) // send to sprite device current state (i.e. bread & butter sprite DMA)
// TODO: firing this in screen update causes sprites to desync badly ... // TODO: firing this in screen update causes sprites to desync badly ...
address_space &space = m_maincpu->space(AS_PROGRAM); sprite_dma_trigger();
for(int i=0;i<0x1000;i+=2)
m_k055673->k053247_word_w(space,i/2,m_banked_ram[(i + m_current_display_bank*0x2000) /2],0xffff);
if (m_sysreg[0x0c / 2] & 0x09) if (m_sysreg[0x0c / 2] & 0x09)
device.execute().set_input_line(M68K_IRQ_5, ASSERT_LINE); device.execute().set_input_line(M68K_IRQ_5, ASSERT_LINE);

View File

@ -101,7 +101,8 @@ public:
UINT32 screen_update_rng_dual_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_rng_dual_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
bitmap_ind16 m_rng_dual_demultiplex_left_temp; bitmap_ind16 m_rng_dual_demultiplex_left_temp;
bitmap_ind16 m_rng_dual_demultiplex_right_temp; bitmap_ind16 m_rng_dual_demultiplex_right_temp;
void sprite_dma_trigger(void);
INTERRUPT_GEN_MEMBER(rng_interrupt); INTERRUPT_GEN_MEMBER(rng_interrupt);
INTERRUPT_GEN_MEMBER(audio_interrupt); INTERRUPT_GEN_MEMBER(audio_interrupt);
}; };

View File

@ -121,7 +121,9 @@ UINT32 rungun_state::screen_update_rng(screen_device &screen, bitmap_ind16 &bitm
bitmap.fill(m_palette->black_pen(), cliprect); bitmap.fill(m_palette->black_pen(), cliprect);
screen.priority().fill(0, cliprect); screen.priority().fill(0, cliprect);
m_current_display_bank = machine().first_screen()->frame_number() & 1; m_current_display_bank = machine().first_screen()->frame_number() & 1;
if(m_single_screen_mode == true)
m_current_display_bank = 0;
if(m_video_priority_mode == false) if(m_video_priority_mode == false)
{ {
m_k053936->zoom_draw(screen, bitmap, cliprect, m_936_tilemap[m_current_display_bank], 0, 0, 1); m_k053936->zoom_draw(screen, bitmap, cliprect, m_936_tilemap[m_current_display_bank], 0, 0, 1);
@ -160,4 +162,19 @@ UINT32 rungun_state::screen_update_rng_dual_right(screen_device &screen, bitmap_
{ {
copybitmap( bitmap, m_rng_dual_demultiplex_right_temp, 0, 0, 0, 0, cliprect); copybitmap( bitmap, m_rng_dual_demultiplex_right_temp, 0, 0, 0, 0, cliprect);
return 0; return 0;
} }
void rungun_state::sprite_dma_trigger(void)
{
address_space &space = m_maincpu->space(AS_PROGRAM);
UINT32 src_address;
if(m_single_screen_mode == true)
src_address = 1*0x2000;
else
src_address = m_current_display_bank*0x2000;
// TODO: size could be programmable somehow.
for(int i=0;i<0x1000;i+=2)
m_k055673->k053247_word_w(space,i/2,m_banked_ram[(i + src_address) /2],0xffff);
}