mirror of
https://github.com/holub/mame
synced 2025-04-20 23:42:22 +03:00
video/upd7220.cpp: horizontal multiplier is x16 if in gfx mode, x8 otherwise
* fix microbx2 and pc9801:diremono
This commit is contained in:
parent
e46068ba88
commit
7149fab833
@ -383,17 +383,11 @@ inline void upd7220_device::update_blank_timer(int state)
|
||||
|
||||
inline void upd7220_device::recompute_parameters()
|
||||
{
|
||||
int horiz_mult = 16, vert_mult = 1;
|
||||
/* TODO: assume that the pitch also controls number of horizontal pixels in a single cell */
|
||||
// horiz_mult = 4 if both mixed and interlace?
|
||||
if((m_mode & UPD7220_MODE_DISPLAY_MASK) == UPD7220_MODE_DISPLAY_MIXED)
|
||||
horiz_mult = 8;
|
||||
else if((m_mode & UPD7220_MODE_INTERLACE_MASK) == UPD7220_MODE_INTERLACE_ON)
|
||||
{
|
||||
// in interlaced mode every line contains both fields
|
||||
horiz_mult = 8; // TODO this breaks microbx2, compis uhrg video, characters are 16 pixels wide in interlaced mode too
|
||||
vert_mult = 2;
|
||||
}
|
||||
// microbx2 wants horizontal multiplier of x16
|
||||
// pc9801:diremono sets up m_mode to be specifically in character mode, wanting x8 here
|
||||
// TODO: verify compis uhrg video & high reso Hyper 98
|
||||
const int horiz_mult = (m_mode & UPD7220_MODE_DISPLAY_MASK) == UPD7220_MODE_DISPLAY_GRAPHICS ? 16 : 8;
|
||||
const int vert_mult = (m_mode & UPD7220_MODE_INTERLACE_MASK) == UPD7220_MODE_INTERLACE_ON ? 2 : 1;
|
||||
|
||||
int horiz_pix_total = (m_hs + m_hbp + m_hfp + m_aw) * horiz_mult;
|
||||
int vert_pix_total = (m_vs + m_vbp + m_al + m_vfp) * vert_mult;
|
||||
|
@ -302,10 +302,10 @@ void microbx2_state::microbx2(machine_config &config)
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, µbx2_state::mem_map);
|
||||
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.set_raw(16_MHz_XTAL, 1024, 0, 768, 674, 31, 607);
|
||||
screen.set_raw(16_MHz_XTAL / 3, 1024, 0, 768, 674, 31, 607);
|
||||
screen.set_screen_update("gdc", FUNC(upd7220a_device::screen_update));
|
||||
|
||||
upd7220a_device &gdc(UPD7220A(config, "gdc", 16_MHz_XTAL / 8));
|
||||
upd7220a_device &gdc(UPD7220A(config, "gdc", 16_MHz_XTAL / 3)); // unverified clock, hand tuned for ~60 Hz
|
||||
gdc.set_addrmap(0, µbx2_state::upd7220_map);
|
||||
gdc.set_display_pixels(FUNC(microbx2_state::display_pixels));
|
||||
gdc.set_screen("screen");
|
||||
|
Loading…
Reference in New Issue
Block a user