This commit is contained in:
Robbbert 2017-09-28 13:38:18 +10:00
commit 699a3ea6e4
6 changed files with 258 additions and 609 deletions

View File

@ -6927,7 +6927,7 @@ has been replaced with an all-zero block. -->
</software>
<software name="opwolf">
<description>Operation Wolf</description>
<description>Operation Wolf (5.25")</description>
<year>1989</year>
<publisher>Taito Corporation</publisher>
<info name="developer" value="Taito Corporation" />
@ -6943,6 +6943,29 @@ has been replaced with an all-zero block. -->
</part>
</software>
<software name="opwolf35" cloneof="opwolf">
<description>Operation Wolf (3.5")</description>
<year>1989</year>
<publisher>Taito Corporation</publisher>
<info name="developer" value="Taito Corporation" />
<part name="flop1" interface="floppy_3_5">
<dataarea name="flop" size = "737280">
<rom name="[PC] Operation Wolf [3.5DD] [Disk 1 of 1].img" size="737280" crc="503b46c4" sha1="c935a1b639b653433380589894d61b573e7c6c5a" offset="0"/>
</dataarea>
</part>
</software>
<software name="outrun">
<description>Out Run</description>
<year>1989</year>
<publisher>Sega Computer Software</publisher>
<part name="flop1" interface="floppy_3_5">
<dataarea name="flop" size = "737280">
<rom name="[PC] Outrun [3.5DD] [Disk 1 of 1].img" size="737280" crc="5bf4afae" sha1="f189136da8ac284cfb3bf06b402328cd827a42a2" offset="0"/>
</dataarea>
</part>
</software>
<software name="overnet">
<description>Over the Net</description>
<year>1991</year>

View File

@ -11,7 +11,6 @@ Undumped Self-Published Titles:
* Cyber Virus (Songbird Productions, CF2007)
* Cyber Virus - CinciClassic Edition (Songbird Productions, CF20B1)
* Lynx Othello (H. Dodgson)
* MegaPak 1 (Songbird Productions, CF2010) - too new (2008)
* PokerMania (MW Software)
* Ponx (Songbird Productions, CF2002)
* Remnant - Planar Wars 3D (Songbird Productions, CF2005)
@ -607,6 +606,18 @@ Known undumped prototypes:
</part>
</software>
<software name="megapak">
<description>MegaPak 1 (Euro, USA)</description>
<year>2007</year>
<publisher>Songbird Productions</publisher>
<info name="serial" value="CF2010" />
<part name="cart" interface="lynx_cart">
<dataarea name="rom" size="262144">
<rom name="Mega Pak 1.bin" size="262144" crc="ca7cf30b" sha1="c961b618021e37cf71104f4f7a04f5ea3e0ccb06" offset="000000" />
</dataarea>
</part>
</software>
<software name="mspacman">
<description>Ms. Pac-Man (Euro, USA)</description>
<year>1990</year>

View File

@ -111,10 +111,12 @@ local function init()
db:exec("END TRANSACTION")
end
init()
if db then
init()
end
function dat.check(set, softlist)
if softlist or not ver then
if softlist or not ver or not db then
return nil
end
info = nil

View File

@ -209,6 +209,8 @@ static ADDRESS_MAP_START( abcheck_map, AS_PROGRAM, 16, namcond1_state )
AM_RANGE(0x400000, 0x40ffff) AM_RAM AM_SHARE("shared_ram")
AM_RANGE(0x600000, 0x607fff) AM_RAM AM_SHARE("zpr1")
AM_RANGE(0x608000, 0x60ffff) AM_RAM AM_SHARE("zpr2")
AM_RANGE(0x700000, 0x700001) AM_WRITENOP
AM_RANGE(0x740000, 0x740001) AM_WRITENOP
AM_RANGE(0x780000, 0x780001) AM_READ(printer_r)
AM_RANGE(0x800000, 0x80000f) AM_DEVICE8("ygv608", ygv608_device, port_map, 0xff00)
AM_RANGE(0xa00000, 0xa00fff) AM_DEVREADWRITE8("at28c16", at28c16_device, read, write, 0xff00)

View File

@ -1,5 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Mark McDougall
// copyright-holders:Mark McDougall, Angelo Salese
/*
* Yamaha YGV608 - PVDC2 Pattern mode Video Display Controller 2
@ -42,7 +42,7 @@
* - fix tilemap dirty flags, move tilemap data in own space prolly helps;
* - DMA from/to ROM;
* - color palette accessors presumably accesses an internal RAMDAC with controllable auto-increment, convert to that;
* - fix char getting cut off from GAME SELECT msg in NCV2;
* - fix char getting cut off from GAME SELECT msg in NCV2 (done, sprite wraparound for sx & sy);
* - clean-ups & documentation;
*
*
@ -54,123 +54,6 @@
#include "screen.h"
// Fundamental constants
enum {
p5_rwai = 0x80, // increment register select on reads
p5_rrai = 0x40, // increment register select on writes
p5_rn = 0x3f, // register select
// p6_res6 = 0xe0,
p6_fp = 0x10, // position detection flag
p6_fv = 0x08, // vertical border interval flag
p6_fc = 0x04,
p6_hb = 0x02, // horizontal blanking flag?
p6_vb = 0x01, // vertical blanking flag?
// p7_res7 = 0xc0,
p7_tr = 0x20,
p7_tc = 0x10,
p7_tl = 0x08,
p7_ts = 0x04,
p7_tn = 0x02,
p7_sr = 0x01,
r0_pnya = 0x80, // if set, increment name table address after reads
r0_b_a = 0x40, // if set, we're reading from the second plane of tile data
r0_pny = 0x3f, // y-coordinate of current name table address
r1_pnxa = 0x80, // if set, increment name table address after read
r1_res1 = 0x40,
r1_pnx = 0x3f, // x-coordinate of current name table address
r2_cpaw = 0x80, // if set, increment color palette address after writes
r2_cpar = 0x40, // if set, increment color palette address after reads
// r2_res2 = 0x20,
r2_b_a = 0x10,
r2_scaw = 0x08, // if set, increment scroll address after writes
r2_scar = 0x04, // if set, increment scroll address after reads
r2_saaw = 0x02, // if set, increment sprite address after writes
r2_saar = 0x01, // if set, increment sprite address after reads
r7_dckm = 0x80,
r7_flip = 0x40,
// r7_res7 = 0x30,
r7_zron = 0x08, // if set, roz plane is active
r7_md = 0x06, // determines 1 of 4 possible video modes
r7_dspe = 0x01, // if set, display is enabled
r8_hds = 0xc0,
r8_vds = 0x30,
r8_rlrt = 0x08,
r8_rlsc = 0x04,
// r8_res8 = 0x02,
r8_pgs = 0x01,
r9_pts = 0xc0,
r9_slh = 0x38,
r9_slv = 0x07,
r10_spa = 0xc0, // misc global sprite attributes (x/y flip or sprite size)
r10_spas = 0x20, // if set, spa controls sprite flip, if clear, controls sprite size
r10_sprd = 0x10, // if set, sprites are disabled
r10_mcb = 0x0c,
r10_mca = 0x03,
r11_scm = 0xc0,
r11_yse = 0x20,
r11_cbdr = 0x10,
r11_prm = 0x0c, // determines one of 4 priority settings
r11_ctpb = 0x02,
r11_ctpa = 0x01,
r12_spf = 0xc0,
r12_bpf = 0x38,
r12_apf = 0x07,
// r14_res14 = 0xfc,
r14_iep = 0x02, // if set, generate IRQ on position detection (?)
r14_iev = 0x01, // if set, generate IRQ on vertical border interval draw
// these 4 are currently unimplemented by us
r16_fpm = 0x80,
r16_il8 = 0x40,
r16_res16 = 0x20,
r16_ih = 0x1f,
r17_ba1 = 0x70,
r17_ba0 = 0x07,
r18_ba3 = 0x70,
r18_ba2 = 0x07,
r19_ba5 = 0x70,
r19_ba4 = 0x07,
r20_ba7 = 0x70,
r20_ba6 = 0x07,
r21_bb1 = 0x70,
r21_bb0 = 0x07,
r22_bb3 = 0x70,
r22_bb2 = 0x07,
r23_bb5 = 0x70,
r23_bb4 = 0x07,
r24_bb7 = 0x70,
r24_bb6 = 0x07,
r39_hsw = 0xe0,
r39_hbw = 0x1f,
r40_htl89 = 0xc0,
r40_hdw = 0x3f,
r43_vsw = 0xe0,
r43_vbw = 0x1f,
r44_vsls = 0x40,
r44_vdw = 0x1f,
r45_vtl8 = 0x80,
r45_tres = 0x40,
r45_vdp = 0x1f
};
// TODO: move these into enums
// R#7(md)
@ -222,9 +105,9 @@ enum {
// R#11(prm)
#define PRM_SABDEX 0x00
#define PRM_ASBDEX 0x04
#define PRM_SEABDX 0x08
#define PRM_ASEBDX 0x0c
#define PRM_ASBDEX 0x01
#define PRM_SEABDX 0x02
#define PRM_ASEBDX 0x03
// R#40
#define HDW_SHIFT 0
@ -383,6 +266,8 @@ static ADDRESS_MAP_START( regs_map, AS_IO, 8, ygv608_device )
AM_RANGE( 8, 8) AM_READWRITE(screen_ctrl_8_r, screen_ctrl_8_w)
AM_RANGE( 9, 9) AM_READWRITE(screen_ctrl_9_r, screen_ctrl_9_w)
AM_RANGE(10, 10) AM_READWRITE(screen_ctrl_10_r, screen_ctrl_10_w)
AM_RANGE(11, 11) AM_READWRITE(screen_ctrl_11_r, screen_ctrl_11_w)
AM_RANGE(12, 12) AM_READWRITE(screen_ctrl_12_r, screen_ctrl_12_w)
AM_RANGE(13, 13) AM_WRITE(border_color_w)
// interrupt section
@ -401,6 +286,8 @@ static ADDRESS_MAP_START( regs_map, AS_IO, 8, ygv608_device )
// CRTC
AM_RANGE(39, 46) AM_WRITE(crtc_w)
// 47-48 ROM transfer control - DMA source address
// 49 ROM transfer control - DMA size
ADDRESS_MAP_END
/***************************************
@ -415,7 +302,7 @@ DEVICE_ADDRESS_MAP_START( port_map, 8, ygv608_device )
AM_RANGE(0x02, 0x02) AM_READWRITE(scroll_data_r,scroll_data_w)
AM_RANGE(0x03, 0x03) AM_READWRITE(palette_data_r,palette_data_w)
AM_RANGE(0x04, 0x04) AM_READWRITE(register_data_r,register_data_w)
AM_RANGE(0x05, 0x05) AM_WRITE(register_select_w)
AM_RANGE(0x05, 0x05) AM_READNOP AM_WRITE(register_select_w)
AM_RANGE(0x06, 0x06) AM_READWRITE(status_port_r,status_port_w)
AM_RANGE(0x07, 0x07) AM_READWRITE(system_control_r,system_control_w)
ADDRESS_MAP_END
@ -440,8 +327,8 @@ ygv608_device::ygv608_device( const machine_config &mconfig, const char *tag, de
//-------------------------------------------------
void ygv608_device::device_start()
{
memset(&m_ports, 0, sizeof(m_ports));
memset(&m_regs, 0, sizeof(m_regs));
// memset(&m_ports, 0, sizeof(m_ports));
// memset(&m_regs, 0, sizeof(m_regs));
memset(&m_pattern_name_table, 0, sizeof(m_pattern_name_table));
memset(&m_sprite_attribute_table, 0, sizeof(m_sprite_attribute_table));
@ -650,11 +537,11 @@ TILE_GET_INFO_MEMBER( ygv608_device::get_tile_info_A_8 )
logerror( "A_8X8: tilemap=%d\n", j );
j = 0;
}
if ((m_regs.s.r12 & r12_apf) != 0)
if (m_planeA_color_fetch != 0)
{
// attribute only valid in 16 color mode
if( set == GFX_8X8_4BIT )
attr = ( j >> ( ((m_regs.s.r12 & r12_apf) - 1 ) * 2 ) ) & 0x0f;
attr = ( j >> ( (m_planeA_color_fetch - 1 ) * 2 ) ) & 0x0f;
}
// banking
if (set == GFX_8X8_4BIT)
@ -748,9 +635,9 @@ TILE_GET_INFO_MEMBER( ygv608_device::get_tile_info_B_8 )
logerror( "B_8X8: tilemap=%d\n", j );
j = 0;
}
if ((m_regs.s.r12 & r12_bpf) != 0)
if (m_planeB_color_fetch != 0)
{
uint8_t color = (m_regs.s.r12 & r12_bpf) >> 3;
uint8_t color = (m_planeB_color_fetch);
/* assume 16 colour mode for now... */
attr = ( j >> ( (color - 1 ) * 2 ) ) & 0x0f;
@ -840,11 +727,11 @@ TILE_GET_INFO_MEMBER( ygv608_device::get_tile_info_A_16 )
j = 0;
}
if ((m_regs.s.r12 & r12_apf) != 0)
if (m_planeA_color_fetch != 0)
{
// attribute only valid in 16 color mode
if( set == GFX_16X16_4BIT )
attr = ( j >> ( ((m_regs.s.r12 & r12_apf)) * 2 ) ) & 0x0f;
attr = ( j >> ( m_planeA_color_fetch * 2 ) ) & 0x0f;
}
// banking
@ -933,9 +820,9 @@ TILE_GET_INFO_MEMBER( ygv608_device::get_tile_info_B_16 )
j = 0;
}
if ((m_regs.s.r12 & r12_bpf) != 0)
if (m_planeB_color_fetch != 0)
{
uint8_t color = (m_regs.s.r12 & r12_bpf) >> 3;
uint8_t color = (m_planeB_color_fetch);
/* assume 16 colour mode for now... */
attr = ( j >> (color * 2)) & 0x0f;
@ -957,19 +844,14 @@ TILE_GET_INFO_MEMBER( ygv608_device::get_tile_info_B_16 )
void ygv608_device::postload()
{
int i;
m_screen_resize = 1;
m_tilemap_resize = 1;
for(i = 0; i < 50; i++)
SetPostShortcuts(i);
}
void ygv608_device::register_state_save()
{
save_item(NAME(m_ports.b));
save_item(NAME(m_regs.b));
// save_item(NAME(m_ports.b));
// save_item(NAME(m_regs.b));
save_item(NAME(m_pattern_name_table));
save_item(NAME(m_sprite_attribute_table.b));
save_item(NAME(m_scroll_data_table));
@ -986,7 +868,11 @@ void ygv608_device::register_state_save()
void ygv608_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
{
#ifdef _ENABLE_SPRITES
const int sprite_limits[4] = { 512-8, 512-16, 512-32, 512-64 };
const uint32_t spritebank_size[4] = { 0x10000, 0x4000, 0x1000, 0x400 };
const int sprite_shift[4] = { 8, 6, 4, 2 };
const int sprite_mask[4] = { 0xff, 0xfc, 0xf0, 0xc0 };
const int spf_shift[4] = { -1, 0, +1, +2 };
// sprites are always clipped to 512x512
// - regardless of the visible display dimensions
rectangle spriteClip(0, 512, 0, 512);
@ -996,7 +882,7 @@ void ygv608_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect
int i;
/* ensure that sprites are enabled */
if( (m_dspe == false ) || (m_sprite_disable == true))
if( (m_dspe == false ) || (m_sprite_disable == true) )
return;
/* draw sprites */
@ -1011,7 +897,7 @@ void ygv608_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect
sy = ( ( ( (int)(sa->attr & 0x01) << 8 ) | (int)sa->sy ) + 1 ) & 0x1ff;
attr = (sa->attr & 0x0c) >> 2;
g_attr = m_sprite_aux_reg & 3;
spf = (m_regs.s.r12 & r12_spf) >> 6;
spf = m_sprite_color_fetch;
if (m_sprite_aux_mode == SPAS_SPRITESIZE )
{
@ -1026,131 +912,43 @@ void ygv608_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect
flipy = (g_attr & SZ_VERTREVERSE) != 0;
}
switch( size )
// calculate code and apply sprite base address
code = ( (int)(m_sprite_bank & sprite_mask[size]) << sprite_shift[size] ) | (int)sa->sn;
// apply spf to color (invalidates individual attribute bits for color)
if (spf != 0)
color = ( code >> ( (spf + spf_shift[size]) * 2 ) ) & 0x0f;
// check code boundary (TODO: do we really need this?)
if( code >= layout_total(size) )
{
case SZ_8X8 :
code = ( (int)m_sprite_bank << 8 ) | (int)sa->sn;
if (spf != 0)
color = ( code >> ( (spf - 1) * 2 ) ) & 0x0f;
if( code >= layout_total(GFX_8X8_4BIT) ) {
logerror( "SZ_8X8: sprite=%d\n", code );
logerror( "SZ_%d: sprite=%d\n", size, code );
code = 0;
}
gfx(GFX_8X8_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x10000,
// draw the sprite
gfx(size)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*spritebank_size[size],
color,
flipx,flipy,
sx,sy,0x00);
// redraw with wrap-around
if( sx > 512-8 )
gfx(GFX_8X8_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x10000,
// draw with wraparound
if(sx > sprite_limits[size] || sy > sprite_limits[size] )
{
gfx(size)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*spritebank_size[size],
color,
flipx,flipy,
sx-512,sy,0x00);
if( sy > 512-8 )
gfx(GFX_8X8_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x10000,
gfx(size)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*spritebank_size[size],
color,
flipx,flipy,
sx,sy-512,0x00);
// really should draw again for both wrapped!
// - ignore until someone thinks it's required
break;
case SZ_16X16 :
code = ( ( (int)m_sprite_bank & 0xfc ) << 6 ) | (int)sa->sn;
if (spf != 0)
color = ( code >> (spf * 2) ) & 0x0f;
if( code >= layout_total(GFX_16X16_4BIT) ) {
logerror( "SZ_8X8: sprite=%d\n", code );
code = 0;
gfx(size)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*spritebank_size[size],
color,
flipx,flipy,
sx-512,sy-512,0x00);
}
gfx(GFX_16X16_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x4000,
color,
flipx,flipy,
sx,sy,0x00);
// redraw with wrap-around
if( sx > 512-16 )
gfx(GFX_16X16_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x4000,
color,
flipx,flipy,
sx-512,sy,0x00);
if( sy > 512-16 )
gfx(GFX_16X16_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x4000,
color,
flipx,flipy,
sx,sy-512,0x00);
// really should draw again for both wrapped!
// - ignore until someone thinks it's required
break;
case SZ_32X32 :
code = ( ( (int)m_sprite_bank & 0xf0 ) << 4 ) | (int)sa->sn;
if (spf != 0)
color = ( code >> ( (spf + 1) * 2 ) ) & 0x0f;
if( code >= layout_total(GFX_32X32_4BIT) ) {
logerror( "SZ_32X32: sprite=%d\n", code );
code = 0;
}
gfx(GFX_32X32_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x1000,
color,
flipx,flipy,
sx,sy,0x00);
// redraw with wrap-around
if( sx > 512-32 )
gfx(GFX_32X32_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x1000,
color,
flipx,flipy,
sx-512,sy,0x00);
if( sy > 512-32 )
gfx(GFX_32X32_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x1000,
color,
flipx,flipy,
sx,sy-512,0x00);
// really should draw again for both wrapped!
// - ignore until someone thinks it's required
break;
case SZ_64X64 :
code = ( ( (int)m_sprite_bank & 0xc0 ) << 2 ) | (int)sa->sn;
if (spf != 0)
color = ( code >> ( (spf + 1) * 2 ) ) & 0x0f;
if( code >= layout_total(GFX_64X64_4BIT) ) {
logerror( "SZ_64X64: sprite=%d\n", code );
code = 0;
}
gfx(GFX_64X64_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x400,
color,
flipx,flipy,
sx,sy,0x00);
// redraw with wrap-around
if( sx > 512-64 )
gfx(GFX_64X64_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x400,
color,
flipx,flipy,
sx-512,sy,0x00);
if( sy > 512-64 )
gfx(GFX_64X64_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x400,
color,
flipx,flipy,
sx,sy-512,0x00);
// really should draw again for both wrapped!
// - ignore until someone thinks it's required
break;
default :
break;
}
}
#endif
@ -1241,9 +1039,9 @@ uint32_t ygv608_device::update_screen(screen_device &screen, bitmap_ind16 &bitma
m_tilemap_A = m_tilemap_A_cache_16[index];
m_tilemap_A->mark_all_dirty();
m_tilemap_A->set_transparent_pen(0 );
m_tilemap_A->set_transparent_pen(0);
// for NCV1 it's sufficient to scroll only columns
m_tilemap_A->set_scroll_cols(m_page_x );
m_tilemap_A->set_scroll_cols(m_page_x);
if (m_pattern_size == PTS_8X8 )
m_tilemap_B = m_tilemap_B_cache_8[index];
@ -1252,7 +1050,7 @@ uint32_t ygv608_device::update_screen(screen_device &screen, bitmap_ind16 &bitma
m_tilemap_B->mark_all_dirty();
// for NCV1 it's sufficient to scroll only columns
m_tilemap_B->set_scroll_cols(m_page_x );
m_tilemap_B->set_scroll_cols(m_page_x);
// now clear the screen in case we change to 1-plane mode
m_work_bitmap.fill(0, finalclip );
@ -1292,12 +1090,12 @@ uint32_t ygv608_device::update_screen(screen_device &screen, bitmap_ind16 &bitma
m_tilemap_A->enable(m_dspe == true);
if(m_md & MD_1PLANE )
m_tilemap_B->enable(0 );
m_tilemap_B->enable(0);
else
m_tilemap_B->enable(m_dspe == true);
m_tilemap_A ->mark_all_dirty();
m_tilemap_B ->mark_all_dirty();
m_tilemap_A->mark_all_dirty();
m_tilemap_B->mark_all_dirty();
/*
@ -1316,6 +1114,9 @@ uint32_t ygv608_device::update_screen(screen_device &screen, bitmap_ind16 &bitma
{
draw_layer_roz(screen, m_work_bitmap, finalclip, m_tilemap_B);
if(m_planeB_trans_enable == true)
copybitmap_trans( bitmap, m_work_bitmap, 0, 0, 0, 0, finalclip, 0);
else
copybitmap( bitmap, m_work_bitmap, 0, 0, 0, 0, finalclip);
}
@ -1324,15 +1125,19 @@ uint32_t ygv608_device::update_screen(screen_device &screen, bitmap_ind16 &bitma
// - look at why this is the case?!?
m_work_bitmap.fill(0, visarea );
if ((m_regs.s.r11 & r11_prm) == PRM_ASBDEX ||
(m_regs.s.r11 & r11_prm) == PRM_ASEBDX )
if (m_priority_mode == PRM_ASBDEX ||
m_priority_mode == PRM_ASEBDX )
draw_sprites(bitmap, finalclip);
draw_layer_roz(screen, m_work_bitmap, finalclip, m_tilemap_A);
copybitmap_trans( bitmap, m_work_bitmap, 0, 0, 0, 0, finalclip, 0);
if ((m_regs.s.r11 & r11_prm) == PRM_SABDEX ||
(m_regs.s.r11 & r11_prm) == PRM_SEABDX)
if(m_planeA_trans_enable == true)
copybitmap_trans( bitmap, m_work_bitmap, 0, 0, 0, 0, finalclip, 0);
else
copybitmap( bitmap, m_work_bitmap, 0, 0, 0, 0, finalclip);
if (m_priority_mode == PRM_SABDEX ||
m_priority_mode == PRM_SEABDX)
draw_sprites(bitmap,finalclip );
@ -1429,14 +1234,14 @@ READ8_MEMBER( ygv608_device::sprite_data_r )
// P#2R - scroll data port
READ8_MEMBER( ygv608_device::scroll_data_r )
{
uint8_t res = m_scroll_data_table[m_ba_plane_select][m_scroll_address];
uint8_t res = m_scroll_data_table[m_ba_plane_scroll_select][m_scroll_address];
if (m_scar == true)
{
m_scroll_address++;
/* handle wrap to next plane */
if (m_scroll_address == 0)
m_ba_plane_select ^= 1;
m_ba_plane_scroll_select ^= 1;
}
return res;
@ -1462,9 +1267,7 @@ READ8_MEMBER( ygv608_device::palette_data_r )
READ8_MEMBER(ygv608_device::register_data_r)
{
int regNum = m_register_address & 0x3f;
uint8_t res = m_regs.b[regNum];
//m_iospace->read_byte(regNum);
uint8_t res = m_iospace->read_byte(regNum);
if (m_register_autoinc_r == true)
@ -1501,7 +1304,7 @@ READ8_MEMBER( ygv608_device::status_port_r )
// P#7R - system control port
READ8_MEMBER( ygv608_device::system_control_r )
{
return (uint8_t)(m_ports.b[7]);
return m_dma_status;
}
// P#0W - pattern name table data write
@ -1604,14 +1407,14 @@ WRITE8_MEMBER( ygv608_device::sprite_data_w )
// P#2W - scroll data port
WRITE8_MEMBER( ygv608_device::scroll_data_w )
{
m_scroll_data_table[m_ba_plane_select][m_scroll_address] = data;
m_scroll_data_table[m_ba_plane_scroll_select][m_scroll_address] = data;
if (m_scaw == true)
{
m_scroll_address++;
/* handle wrap to next plane */
if (m_scroll_address == 0)
m_ba_plane_select ^= 1;
m_ba_plane_scroll_select ^= 1;
}
}
@ -1640,9 +1443,6 @@ WRITE8_MEMBER( ygv608_device::register_data_w )
uint8_t regNum = m_register_address & 0x3f;
//logerror( "R#%d = $%02X\n", regNum, data );
SetPreShortcuts (regNum, data);
m_regs.b[regNum] = data;
SetPostShortcuts (regNum);
m_iospace->write_byte(regNum, data);
if (m_register_autoinc_w == true)
@ -1685,25 +1485,35 @@ WRITE8_MEMBER( ygv608_device::status_port_w )
// P#7W - system control port
WRITE8_MEMBER( ygv608_device::system_control_w )
{
m_ports.b[7] = data;
if (m_ports.b[7] & 0x3e)
m_dma_status = data;
if (m_dma_status & 0x3e)
HandleRomTransfers(data & 0x3e);
if (m_ports.b[7] & 0x01)
HandleYGV608Reset();
if (m_dma_status & 0x01)
HandleReset();
}
// TODO: actual timing of this
void ygv608_device::HandleYGV608Reset()
void ygv608_device::HandleReset()
{
int i;
/* Clear ports #0-7 */
memset( &m_ports.b[0], 0, 8 );
//memset( &m_ports.b[0], 0, 8 );
// most likely variables to be reset here from ports, there might be more
pattern_name_base_w = 0;
pattern_name_base_r = 0;
m_register_address = 0;
m_register_autoinc_r = false;
m_register_autoinc_w = false;
/* Clear registers #0-38, #47-49 */
memset( &m_regs.b[0], 0, 39 );
memset( &m_regs.b[47], 0, 3 );
for(i=0;i<39;i++)
m_iospace->write_byte(i, 0x00);
for(i=47;i<50;i++)
m_iospace->write_byte(i, 0x00);
// memset( &m_regs.b[0], 0, 39 );
// memset( &m_regs.b[47], 0, 3 );
/* Clear internal ram */
memset( m_pattern_name_table, 0, 4096 );
@ -1711,12 +1521,6 @@ void ygv608_device::HandleYGV608Reset()
SPRITE_ATTR_TABLE_SIZE );
memset( m_scroll_data_table, 0, 2*256 );
memset( m_colour_palette, 0, 256*3 );
/* should set shortcuts here too */
for( i=0; i<50; i++ ) {
//SetPreShortcuts( i );
SetPostShortcuts( i );
}
}
/*
@ -1725,12 +1529,12 @@ void ygv608_device::HandleYGV608Reset()
it for testing trojan ROM software.
- So leave it in!
*/
void ygv608_device::HandleRomTransfers(uint8_t type)
{
popmessage("ROM DMA used %02x",type);
#if 0
// TODO: eventually update this code to latest
static uint8_t *sdt = (uint8_t *)m_scroll_data_table;
static uint8_t *sat = (uint8_t *)m_sprite_attribute_table.b;
@ -1789,7 +1593,7 @@ void ygv608_device::HandleRomTransfers(uint8_t type)
// R#0R - Pattern Name Table Access pointer Y
READ8_MEMBER( ygv608_device::pattern_name_table_y_r )
{
return ((m_xtile_autoinc == true) << 7) | ((m_plane_select_access == true) << 6) | m_xtile_ptr;
return (m_ytile_autoinc << 7) | (m_plane_select_access << 6) | m_ytile_ptr;
}
// R#0W - Pattern Name Table Access pointer Y
@ -1802,6 +1606,7 @@ WRITE8_MEMBER( ygv608_device::pattern_name_table_y_w )
m_ytile_ptr &= m_page_y -1;
m_ytile_autoinc = BIT(data,7);
m_plane_select_access = BIT(data,6);
// TODO: done by Dig Dug Original
if(m_ytile_autoinc == true && m_xtile_autoinc == true)
logerror("%s: Warning both X/Y Tiles autoinc enabled!\n",this->tag());
}
@ -1809,7 +1614,7 @@ WRITE8_MEMBER( ygv608_device::pattern_name_table_y_w )
// R#1R - Pattern Name Table Access pointer X
READ8_MEMBER( ygv608_device::pattern_name_table_x_r )
{
return ((m_xtile_autoinc == true) << 7) | m_xtile_ptr;
return (m_xtile_autoinc << 7) | m_xtile_ptr;
}
// R#1W - Pattern Name Table Access pointer X
@ -1821,6 +1626,7 @@ WRITE8_MEMBER( ygv608_device::pattern_name_table_x_w )
// xTile, m_page_x );
m_xtile_ptr &= m_page_x -1;
m_xtile_autoinc = BIT(data,7);
// TODO: done by Dig Dug Original
if(m_ytile_autoinc == true && m_xtile_autoinc == true)
logerror("%s: Warning both X/Y Tiles autoinc enabled!\n",this->tag());
}
@ -1838,7 +1644,7 @@ WRITE8_MEMBER( ygv608_device::pattern_name_table_x_w )
READ8_MEMBER( ygv608_device::ram_access_ctrl_r )
{
return (m_cpaw<<7) | (m_cpar<<6) |
(m_ba_plane_select<<4) |
(m_ba_plane_scroll_select<<4) |
(m_scaw<<3) | (m_scar<<2) | (m_saaw<<1) | (m_saar<<0);
}
@ -1849,7 +1655,7 @@ WRITE8_MEMBER( ygv608_device::ram_access_ctrl_w )
m_saaw = BIT(data,1);
m_scar = BIT(data,2);
m_scaw = BIT(data,3);
m_ba_plane_select = BIT(data,4);
m_ba_plane_scroll_select = BIT(data,4);
m_cpar = BIT(data,6);
m_cpaw = BIT(data,7);
}
@ -2025,7 +1831,7 @@ WRITE8_MEMBER( ygv608_device::screen_ctrl_9_w )
m_tilemap_resize = 1;
m_pattern_size = new_pts;
m_h_div_size = (data >> 3) & 7;
/**/m_h_div_size = (data >> 3) & 7;
m_v_div_size = (data >> 0) & 7;
//popmessage("%02x %02x",m_h_div_size,m_v_div_size);
@ -2049,7 +1855,14 @@ WRITE8_MEMBER( ygv608_device::screen_ctrl_9_w )
}
}
// R#10R - screen control: mosaic & sprite
// R#10R - screen control 10: mosaic & sprite
/***
* xx-- ---- SPAx: Auxiliary bits of sprite attribute table (0=8x8 or no flip, 1=16x16 or flipy, 2=32x32 or flipx, 3=64x64 or flipx & y )
* --x- ---- SPAS: Auxiliary function select (0=SPAx selects sprite size, 1=SPAx selects flipping)
* ---x ---- SPRD: Sprite display disable
* ---- xx-- MCBx: Mosaic enable on plane B
* ---- --xx MCAx: Mosaic enable on plane A
***/
READ8_MEMBER( ygv608_device::screen_ctrl_10_r )
{
return (m_sprite_aux_reg << 6) | ((m_sprite_aux_mode == true) << 5) | ((m_sprite_disable == true) << 4)
@ -2059,15 +1872,47 @@ READ8_MEMBER( ygv608_device::screen_ctrl_10_r )
// R#10W - screen control: mosaic & sprite
WRITE8_MEMBER( ygv608_device::screen_ctrl_10_w )
{
m_sprite_aux_reg = (data & 0xc0) >> 6;
m_sprite_aux_mode = BIT(data, 5);
m_sprite_disable = BIT(data, 4);
// check mosaic
m_mosaic_aplane = data & 3;
m_mosaic_bplane = (data & 0xc) >> 2;
m_mosaic_aplane = data & 3;
if(m_mosaic_aplane || m_mosaic_bplane)
popmessage("Mosaic effect %02x %02x",m_mosaic_aplane,m_mosaic_bplane);
}
m_sprite_disable = BIT(data, 4);
m_sprite_aux_mode = BIT(data, 5);
m_sprite_aux_reg = (data & 0xc0) >> 6;
// R#11R - screen control 11
READ8_MEMBER( ygv608_device::screen_ctrl_11_r )
{
return (m_scm<<6)|(m_yse<<5)|(m_cbdr<<4)|
(m_priority_mode<<2)|(m_planeB_trans_enable<<1)|(m_planeA_trans_enable<<0);
}
// R#11W - screen control 11
WRITE8_MEMBER( ygv608_device::screen_ctrl_11_w )
{
/**/m_scm = (data >> 6) & 3;
/**/m_yse = BIT(data,5);
/**/m_cbdr = BIT(data,4);
m_priority_mode = (data >> 2) & 3;
m_planeB_trans_enable = BIT(data,1);
m_planeA_trans_enable = BIT(data,0);
}
// R#12R - screen control 12: color fetch modes
READ8_MEMBER( ygv608_device::screen_ctrl_12_r )
{
return (m_sprite_color_fetch<<6)|(m_planeB_color_fetch<<3)|(m_planeA_color_fetch<<0);
}
// R#12W - screen control 12: color fetch modes
WRITE8_MEMBER( ygv608_device::screen_ctrl_12_w )
{
m_sprite_color_fetch = (data >> 6) & 3;
m_planeB_color_fetch = (data >> 3) & 7;
m_planeA_color_fetch = (data >> 0) & 7;
}
// R#13W - border color
@ -2243,10 +2088,15 @@ WRITE8_MEMBER( ygv608_device::crtc_w )
case 40:
{
m_crtc.htotal &= ~0x600;
m_crtc.htotal |= (data & 0xc0) << 3;
int new_display_width = (data & 0x3f) * 16;
m_crtc.display_width = (data & 0x3f) * 16;
m_crtc.htotal &= ~0x600;
m_crtc.htotal |= ((data & 0xc0) << 3);
if(new_display_width != m_crtc.display_width)
m_screen_resize = 1;
m_crtc.display_width = new_display_width;
break;
}
@ -2260,7 +2110,7 @@ WRITE8_MEMBER( ygv608_device::crtc_w )
case 42:
{
m_crtc.htotal &= ~0x1fe;
m_crtc.htotal |= (data & 0xff) << 1;
m_crtc.htotal |= ((data & 0xff) << 1);
//printf("H %d %d %d %d %d\n",m_crtc.htotal,m_crtc.display_hstart,m_crtc.display_width,m_crtc.display_hsync,m_crtc.border_width);
break;
@ -2275,9 +2125,13 @@ WRITE8_MEMBER( ygv608_device::crtc_w )
case 44:
{
// TODO: VSLS, bit 6
int new_display_height = (data & 0x3f) * 8;
m_crtc.display_height = (data & 0x3f) * 8;
// TODO: VSLS, bit 6
if(new_display_height != m_crtc.display_height)
m_screen_resize = 1;
m_crtc.display_height = new_display_height;
break;
}
@ -2318,7 +2172,9 @@ void ygv608_device::screen_configure()
//rectangle visarea(m_crtc.display_hstart, display_hend, m_crtc.display_vstart, display_vend);
rectangle visarea(0, display_hend, 0, display_vend);
attoseconds_t period = HZ_TO_ATTOSECONDS(m_screen->clock()) * m_crtc.vtotal * (m_crtc.htotal / 2);
// TODO: Dig Dug Original wants this to be 60.60 Hz (like original Namco HW), lets compensate somehow
// (clock is really 6144000 x 8 = 49152000, so it must have same parameters in practice)
attoseconds_t period = HZ_TO_ATTOSECONDS(m_screen->clock()) * (m_crtc.vtotal + m_crtc.display_vsync) * ((m_crtc.htotal + 12 - m_crtc.display_hsync) / 2);
m_screen->configure(m_crtc.htotal / 2, m_crtc.vtotal, visarea, period );
@ -2328,174 +2184,4 @@ void ygv608_device::screen_configure()
m_vblank_timer->adjust(m_screen->time_until_pos(m_crtc.display_height,0), 0, m_screen->frame_period());
}
// Set any "short-cut" variables before we update the YGV608 registers
// - these are used only in optimisation of the emulation
void ygv608_device::SetPreShortcuts( int reg, int data )
{
switch( reg ) {
case 40 :
if( ( ( data >> HDW_SHIFT ) & HDW_MASK ) != (m_regs.s.r40 & r40_hdw))
m_screen_resize = 1;
break;
case 44 :
if( ( ( data >> VDW_SHIFT ) & VDW_MASK ) != (m_regs.s.r44 & r44_vdw))
m_screen_resize = 1;
break;
}
}
// Set any "short-cut" variables after we have updated the YGV608 registers
// - these are used only in optimisation of the emulation
// TODO: actually this is legacy code that needs to go away
void ygv608_device::SetPostShortcuts(int reg )
{
switch (reg)
{
case 11 :
//ShowYGV608Registers();
break;
}
}
void ygv608_device::ShowYGV608Registers()
{
int p, b;
logerror( "YGV608 Registers\n" );
logerror(
"\tR#00: $%02X : PNYA(%d),B/A(%c),PNY(%d)\n",
m_regs.b[0],
m_regs.s.r0 & r0_pnya,
((m_plane_select_access == true) ? 'B' : 'A' ),
m_regs.s.r0 & r0_pny);
logerror(
"\tR#01: $%02X : PNXA(%d),PNX(%d)\n",
m_regs.b[1],
m_regs.s.r1 & r1_pnxa,
m_regs.s.r1 & r1_pnx);
logerror(
"\tR#02: $%02X : CPAW(%d),CPAR(%d),B/A(%d),SCAW(%d),SCAR(%d),SAAW(%d),SAAR(%d)\n",
m_regs.b[2],
m_regs.s.r2 & r2_cpaw,
m_regs.s.r2 & r2_cpar,
m_regs.s.r2 & r2_b_a,
m_regs.s.r2 & r2_scaw,
m_regs.s.r2 & r2_scar,
m_regs.s.r2 & r2_saaw,
m_regs.s.r2 & r2_saar);
logerror(
"\tR#03: $%02X : SAA($%02X)\n",
m_regs.b[3],
m_sprite_address );
logerror(
"\tR#04: $%02X : SCA($%02X)\n",
m_regs.b[4],
m_regs.s.sca );
logerror(
"\tR#05: $%02X : CC($%02X)\n",
m_regs.b[5],
m_regs.s.cc );
logerror(
"\tR#06: $%02X : SBA($%02X)\n",
m_regs.b[6],
m_sprite_bank );
logerror(
"\tR#07: $%02X : DSPE(%d),MD(%d),ZRON(%d),FLIP(%d),DCKM(%d)\n",
m_regs.b[7],
m_regs.s.r7 & r7_dspe,
m_regs.s.r7 & r7_md,
m_regs.s.r7 & r7_zron,
m_regs.s.r7 & r7_flip,
m_regs.s.r7 & r7_dckm);
logerror(
"\tR#08: $%02X : HDS(%d),VDS(%d),RLRT(%d),RLSC(%d),PGS(%d)\n",
m_regs.b[8],
m_regs.s.r8 & r8_hds,
m_regs.s.r8 & r8_vds,
m_regs.s.r8 & r8_rlrt,
m_regs.s.r8 & r8_rlsc,
m_regs.s.r8 & r8_pgs);
logerror(
"\tR#11: $%02X : CTPA(%d),CTPB(%d),PRM(%d),CBDR(%d),YSE(%d),SCM(%d)\n",
m_regs.b[11],
m_regs.s.r11 & r11_ctpa,
m_regs.s.r11 & r11_ctpb,
m_regs.s.r11 & r11_prm,
m_regs.s.r11 & r11_cbdr,
m_regs.s.r11 & r11_yse,
m_regs.s.r11 & r11_scm);
logerror(
"\tR#40: $%02X : HTL9:8($%02X)=$%06X,HDW(%d)\n",
m_regs.b[40],
m_regs.s.r40 & r40_htl89, (int)(m_regs.s.r40 & r40_htl89) << 8,
m_regs.s.r40 & r40_hdw);
logerror(
"\tR#41: $%02X : HDSP($%02X)\n",
m_regs.b[41],
m_regs.s.hdsp );
logerror(
"\tR#42: $%02X : HTL7:0($%02X)\n",
m_regs.b[42],
m_regs.s.htl );
logerror(
"\t HTL=$%03X\n",
( (int)(m_regs.s.r40 & r40_htl89) << 8 ) |
( (int)m_regs.s.htl ) );
logerror(
"\tR#47: $%02X : TB12:5($%02X) = $%06X\n",
m_regs.b[47],
m_regs.s.tb5, (int)m_regs.s.tb5 << 5 );
logerror(
"\tR#48: $%02X : TB20:13($%02X) = $%06X\n",
m_regs.b[48],
m_regs.s.tb13, (int)m_regs.s.tb13 << 13 );
logerror(
"\t TB=$%06X\n",
( (int)m_regs.s.tb13 << 13 ) |
( (int)m_regs.s.tb5 << 5 ) );
logerror(
"\tR#49: $%02X : TN11:4($%02X) = $%04X\n",
m_regs.b[49],
m_regs.s.tn4, (int)m_regs.s.tn4 << 4 );
logerror(
"ShortCuts:\n" );
for( p=0; p<2; p++ ) {
logerror( "\t" );
for( b=0; b<8; b++ ) {
logerror( "%02X ", m_base_addr[p][b] );
}
logerror( "\n" );
}
}

View File

@ -64,6 +64,10 @@ public:
DECLARE_WRITE8_MEMBER(screen_ctrl_9_w);
DECLARE_READ8_MEMBER(screen_ctrl_10_r);
DECLARE_WRITE8_MEMBER(screen_ctrl_10_w);
DECLARE_READ8_MEMBER(screen_ctrl_11_r);
DECLARE_WRITE8_MEMBER(screen_ctrl_11_w);
DECLARE_READ8_MEMBER(screen_ctrl_12_r);
DECLARE_WRITE8_MEMBER(screen_ctrl_12_w);
DECLARE_READ8_MEMBER(irq_mask_r);
DECLARE_WRITE8_MEMBER(irq_mask_w);
DECLARE_READ8_MEMBER(irq_ctrl_r);
@ -105,87 +109,6 @@ private:
const address_space_config m_io_space_config;
static constexpr unsigned SPRITE_ATTR_TABLE_SIZE = 256;
struct YGV_PORTS {
uint8_t na; // P#0 - pattern name table data port (read/write)
uint8_t p1; // P#1 - sprite data port (read/write)
uint8_t p2; // P#2 - scroll data port (read/write)
uint8_t p3; // P#3 - colour palette data port (read/write)
uint8_t p4; // P#4 - register data port (read/write)
uint8_t p5; // P#5 - register select port (write only)
uint8_t p6; // P#6 - status port (read/write)
uint8_t p7; // P#7 - system control port (read/write)
};
struct YGV_REGS {
uint8_t r0; // R#0 - pattern name table access ptr (r/w)
uint8_t r1; // R#1 - pattern name table access ptr (r/w)
uint8_t r2; // R#2 - built in ram access control
uint8_t saa; // R#3 - sprite attribute table access ptr (r/w)
uint8_t sca; // R#4 - scroll table access ptr (r/w)
uint8_t cc; // R#5 - color palette access ptr (r/w)
uint8_t sba; // R#6 - sprite generator base address (r/w)
// R#7 - R#11 - screen control (r/w)
uint8_t r7; // misc screen control (r/w)
uint8_t r8; // misc screen control (r/w)
uint8_t r9; // misc screen control (r/w)
uint8_t r10; // misc screen control (r/w)
uint8_t r11; // misc screen control (r/w)
uint8_t r12; // R#12 - color palette selection (r/w)
uint8_t bdc; // R#13 - border colour (wo)
// R#14 - R#16 - interrupt control
uint8_t r14;
uint8_t il;
uint8_t r16;
// R#17 - R#24 - base address (wo)
uint8_t r17;
uint8_t r18;
uint8_t r19;
uint8_t r20;
uint8_t r21;
uint8_t r22;
uint8_t r23;
uint8_t r24;
// R#25 - R#38 - enlargement, contraction and rotation parameters (wo)
uint8_t ax0;
uint8_t ax8;
uint8_t ax16;
uint8_t dx0;
uint8_t dx8;
uint8_t dxy0;
uint8_t dxy8;
uint8_t ay0;
uint8_t ay8;
uint8_t ay16;
uint8_t dy0;
uint8_t dy8;
uint8_t dyx0;
uint8_t dyx8;
// R#39 - R#46 - display scan control (wo)
uint8_t r39;
uint8_t r40;
uint8_t hdsp;
uint8_t htl;
uint8_t r43;
uint8_t r44;
uint8_t r45;
uint8_t vtl;
// R#47 - R#49 - rom transfer control (wo)
uint8_t tb5;
uint8_t tb13;
uint8_t tn4;
};
static constexpr unsigned MAX_SPRITES = SPRITE_ATTR_TABLE_SIZE >> 2;
struct SPRITE_ATTR {
@ -215,21 +138,9 @@ private:
tilemap_t *m_tilemap_B;
bitmap_ind16 m_work_bitmap;
void HandleYGV608Reset();
void HandleReset();
void HandleRomTransfers(uint8_t type);
void SetPreShortcuts(int reg, int data );
void SetPostShortcuts(int reg);
void ShowYGV608Registers();
union {
uint8_t b[8];
YGV_PORTS s;
} m_ports;
union {
uint8_t b[50];
YGV_REGS s;
} m_regs;
/*
* Built in ram
@ -255,6 +166,7 @@ private:
uint8_t m_na8_mask; // mask on/off na11/9:8
int m_col_shift; // shift in scroll table column index
// base address shortcuts
uint32_t m_base_addr[2][8];
uint32_t m_base_y_shift; // for extracting pattern y coord 'base'
@ -268,10 +180,12 @@ private:
int pattern_name_base_r,pattern_name_base_w; /* pattern name table base address */
// === new variable handling starts here ===
uint8_t m_screen_status; /**< port #6: status port r/w */
uint8_t m_dma_status; /**< port #7: system control port r/w */
uint8_t m_register_address; /**< RN: Register address select */
bool m_register_autoinc_r; /**< RRAI: Register address auto-increment on read */
bool m_register_autoinc_w; /**< RWAI: Register address auto-increment on write */
uint8_t m_screen_status; /**< CD: status port r/w */
bool m_raster_irq_mask; /**< IEP: raster irq mask (INT1 occurs if 1) */
bool m_vblank_irq_mask; /**< IEV: vblank irq mask (INT0 occurs if 1) */
@ -302,7 +216,7 @@ private:
bool m_scaw; /**< SCAW: Address autoinc after writing scroll data table */
bool m_cpar; /**< CPAR: Address autoinc after reading color palette */
bool m_cpaw; /**< CPAW: Address autoinc after writing color palette */
bool m_ba_plane_select; /**< B/(A) P#2 gains access to scroll data table in A/B plane */
bool m_ba_plane_scroll_select; /**< B/(A) P#2 gains access to scroll data table in A/B plane */
bool m_dspe; /**< DSPE: display permission of pattern plane(s) (screen blanked if 0) */
uint8_t m_md; /**< MDx: mode for pattern planes */
@ -320,6 +234,17 @@ private:
uint8_t m_h_div_size; /**< SLH: size of horizontal division in screen division scrolling */
uint8_t m_v_div_size; /**< SLV: size of vertical division in screen division scrolling */
bool m_planeA_trans_enable; /**< CTPA: enable transparency for plane A */
bool m_planeB_trans_enable; /**< CTPA: enable transparency for plane B */
uint8_t m_priority_mode; /**< PRM: priority mode select */
bool m_cbdr; /**< CBDR: color bus terminals CB7 to 0 and SPRT */
bool m_yse; /**< YSE: permission control of trasparency timing output of YS terminal */
uint8_t m_scm; /**< SCM: output frequency of clock signal output from terminal FSC */
uint8_t m_planeA_color_fetch; /**< APF: A plane color fetch mode */
uint8_t m_planeB_color_fetch; /**< BPF: B plane color fetch mode */
uint8_t m_sprite_color_fetch; /**< SPF: sprite color fetch mode */
// screen section
devcb_write_line m_vblank_handler;
devcb_write_line m_raster_handler;