mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
rendfont: set minimum width of scaled bitmap for font chars used in .lay files to 1 if it's larger than 0.5, this prevents lowercase l and i not showing while the text label is still readable (I also tried rounding up everything but that's uglier overall),
misc: small cleanup
This commit is contained in:
parent
24c3868994
commit
e8b144d7a9
@ -448,6 +448,7 @@ void i8244_device::write_cx(int x, bool cx)
|
||||
if (colx & m_vdc.s.collision)
|
||||
m_collision_status |= 0x40;
|
||||
}
|
||||
|
||||
// check if an already drawn object would collide with us
|
||||
if (m_vdc.s.collision & 0x40)
|
||||
{
|
||||
@ -553,7 +554,7 @@ void i8244_device::draw_grid(int scanline, bitmap_ind16 &bitmap, const rectangle
|
||||
}
|
||||
|
||||
|
||||
void i8244_device::char_pixel(u8 index, int x, int y, u8 pixel, u16 color, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
void i8244_device::major_pixel(u8 index, int x, int y, u8 pixel, u16 color, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
for (int px = x; px < x + 2; px++)
|
||||
{
|
||||
@ -614,7 +615,7 @@ void i8244_device::draw_major(int scanline, bitmap_ind16 &bitmap, const rectangl
|
||||
|
||||
u16 color = 8 + ((m_vdc.s.quad[i].single[j].color >> 1) & 0x07);
|
||||
for (int cx = 0; cx < 8; cx++, x += 2)
|
||||
char_pixel(4 * j + 16 * i + 0x40, x, scanline, BIT(m_charset[offset & 0x1ff], cx ^ 7), color, bitmap, cliprect);
|
||||
major_pixel(4 * j + 16 * i + 0x40, x, scanline, BIT(m_charset[offset & 0x1ff], cx ^ 7), color, bitmap, cliprect);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -636,7 +637,7 @@ void i8244_device::draw_major(int scanline, bitmap_ind16 &bitmap, const rectangl
|
||||
int x = (m_vdc.s.foreground[i].x + 5) * 2;
|
||||
u16 color = 8 + ((m_vdc.s.foreground[i].color >> 1) & 0x07);
|
||||
for (int cx = 0; cx < 8; cx++, x += 2)
|
||||
char_pixel(4 * i + 0x10, x, scanline, BIT(m_charset[offset & 0x1ff], cx ^ 7), color, bitmap, cliprect);
|
||||
major_pixel(4 * i + 0x10, x, scanline, BIT(m_charset[offset & 0x1ff], cx ^ 7), color, bitmap, cliprect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ protected:
|
||||
void draw_grid(int scanline, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_major(int scanline, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_minor(int scanline, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void char_pixel(u8 index, int x, int y, u8 pixel, u16 color, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void major_pixel(u8 index, int x, int y, u8 pixel, u16 color, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
// callbacks
|
||||
devcb_write_line m_irq_func;
|
||||
|
@ -758,7 +758,8 @@ void render_font::get_scaled_bitmap_and_bounds(bitmap_argb32 &dest, float height
|
||||
bounds.min_y = 0;
|
||||
|
||||
// compute x1,y1 from there based on the bitmap size
|
||||
bounds.set_width(float(gl.bmwidth) * scale * aspect);
|
||||
float width = float(gl.bmwidth) * scale * aspect;
|
||||
bounds.set_width(width < 0.5f ? 0 : std::max(int(width), 1));
|
||||
bounds.set_height(float(m_height) * scale);
|
||||
|
||||
// if the bitmap isn't big enough, bail
|
||||
|
@ -1790,10 +1790,10 @@ private:
|
||||
{
|
||||
u8 const *const src(reinterpret_cast<u8 const *>(dst));
|
||||
rgb_t const d(
|
||||
u8((float(src[3]) * c.a) + 0.5),
|
||||
u8((float(src[0]) * c.r) + 0.5),
|
||||
u8((float(src[1]) * c.g) + 0.5),
|
||||
u8((float(src[2]) * c.b) + 0.5));
|
||||
u8((float(src[3]) * c.a) + 0.5F),
|
||||
u8((float(src[0]) * c.r) + 0.5F),
|
||||
u8((float(src[1]) * c.g) + 0.5F),
|
||||
u8((float(src[2]) * c.b) + 0.5F));
|
||||
*dst = d;
|
||||
havealpha = havealpha || (d.a() < 255U);
|
||||
}
|
||||
|
@ -54,12 +54,9 @@ public:
|
||||
m_inputs(*this, "IN.0")
|
||||
{ }
|
||||
|
||||
// machine configs
|
||||
void chesster(machine_config &config);
|
||||
void kishon(machine_config &config);
|
||||
|
||||
void init_chesster();
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
|
||||
@ -75,7 +72,6 @@ private:
|
||||
u8 m_speech_bank = 0;
|
||||
u8 m_select = 0;
|
||||
|
||||
// address maps
|
||||
void main_map(address_map &map);
|
||||
|
||||
// I/O handlers
|
||||
@ -83,14 +79,12 @@ private:
|
||||
u8 input_r(offs_t offset);
|
||||
};
|
||||
|
||||
void chesster_state::init_chesster()
|
||||
{
|
||||
m_numbanks = memregion("rombank")->bytes() / 0x4000;
|
||||
m_rombank->configure_entries(0, m_numbanks, memregion("rombank")->base(), 0x4000);
|
||||
}
|
||||
|
||||
void chesster_state::machine_start()
|
||||
{
|
||||
// set up ROM banks (kishon's is 4 times larger)
|
||||
m_numbanks = memregion("rombank")->bytes() / 0x4000;
|
||||
m_rombank->configure_entries(0, m_numbanks, memregion("rombank")->base(), 0x4000);
|
||||
|
||||
// register for savestates
|
||||
save_item(NAME(m_speech_bank));
|
||||
save_item(NAME(m_select));
|
||||
@ -220,7 +214,7 @@ ROM_START( chesster ) // model 6120, PCB label 510.1141C01
|
||||
ROM_LOAD("ch_1.3.ic9", 0x8000, 0x8000, CRC(8b42d1ad) SHA1(2161fc5ab2476fe7ca4ffc226e3cb329b8a57a01) ) // 27256, CH 1.3 on sticker
|
||||
|
||||
ROM_REGION( 0x20000, "rombank", 0 )
|
||||
ROM_LOAD("101-1091b02.ic10", 0x0000, 0x20000, CRC(fa370e88) SHA1(a937c8f1ec295cf9539d12466993974e40771493) ) // AMI, 27C010 or equivalent
|
||||
ROM_LOAD("101-1091b02.ic10", 0x00000, 0x20000, CRC(fa370e88) SHA1(a937c8f1ec295cf9539d12466993974e40771493) ) // AMI, 27C010 or equivalent
|
||||
ROM_END
|
||||
|
||||
ROM_START( chesstera ) // model 6120, PCB label 510.1141C01
|
||||
@ -228,7 +222,7 @@ ROM_START( chesstera ) // model 6120, PCB label 510.1141C01
|
||||
ROM_LOAD("chesster.ic9", 0x8000, 0x8000, CRC(29f9a698) SHA1(4c83ca46fd5fc9c40302e9c7f16b4ae2c18b06e6) ) // M27C256B, sticker but no label
|
||||
|
||||
ROM_REGION( 0x20000, "rombank", 0 )
|
||||
ROM_LOAD("101-1091a02.ic10", 0x0000, 0x20000, CRC(2b4d243c) SHA1(921e51978facb502b207b4f64a73b1e74127e826) ) // AMI, 27C010 or equivalent
|
||||
ROM_LOAD("101-1091a02.ic10", 0x00000, 0x20000, CRC(2b4d243c) SHA1(921e51978facb502b207b4f64a73b1e74127e826) ) // AMI, 27C010 or equivalent
|
||||
ROM_END
|
||||
|
||||
ROM_START( kishon ) // model 6120G or 6127(same), PCB label 510.1141C01
|
||||
@ -236,7 +230,7 @@ ROM_START( kishon ) // model 6120G or 6127(same), PCB label 510.1141C01
|
||||
ROM_LOAD("gc_2.3.ic9", 0x8000, 0x8000, CRC(121c007f) SHA1(652e9ea47b6bb1632d10eb0fcd7f98cdba22fce7) ) // 27C256, GC 2.3 on sticker, also seen without label
|
||||
|
||||
ROM_REGION( 0x80000, "rombank", 0 )
|
||||
ROM_LOAD("kishon_chesster_v2.6.ic10", 0x0000, 0x80000, CRC(50598869) SHA1(2087e0c2f40a2408fe217a6502c8c3a247bdd063) ) // Toshiba TC544000P-12, 1-14-91, aka 101-1094A01 on 6127
|
||||
ROM_LOAD("kishon_chesster_v2.6.ic10", 0x00000, 0x80000, CRC(50598869) SHA1(2087e0c2f40a2408fe217a6502c8c3a247bdd063) ) // Toshiba TC544000P-12, 1-14-91, aka 101-1094A01 on 6127
|
||||
ROM_END
|
||||
|
||||
ROM_START( kishona ) // possibly Mephisto brand?, PCB label 510.1141C01
|
||||
@ -244,7 +238,7 @@ ROM_START( kishona ) // possibly Mephisto brand?, PCB label 510.1141C01
|
||||
ROM_LOAD("german_chesster_v2.2.ic9", 0x8000, 0x8000, CRC(43e0cfcd) SHA1(961c7335f562b19fa96324c429ab70e8ab4d7647) ) // 27C256, 15.1.91
|
||||
|
||||
ROM_REGION( 0x80000, "rombank", 0 )
|
||||
ROM_LOAD("kishon_chesster_v2.6.ic10", 0x0000, 0x80000, CRC(50598869) SHA1(2087e0c2f40a2408fe217a6502c8c3a247bdd063) ) // Toshiba TC544000P-12
|
||||
ROM_LOAD("kishon_chesster_v2.6.ic10", 0x00000, 0x80000, CRC(50598869) SHA1(2087e0c2f40a2408fe217a6502c8c3a247bdd063) ) // Toshiba TC544000P-12
|
||||
ROM_END
|
||||
|
||||
} // anonymous namespace
|
||||
@ -255,8 +249,8 @@ ROM_END
|
||||
Drivers
|
||||
*******************************************************************************/
|
||||
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
|
||||
SYST( 1990, chesster, 0, 0, chesster, chesster, chesster_state, init_chesster, "Fidelity Electronics", "Chesster Challenger (v1.3)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||
SYST( 1990, chesstera, chesster, 0, chesster, chesster, chesster_state, init_chesster, "Fidelity Electronics", "Chesster Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||
SYST( 1991, kishon, chesster, 0, kishon, chesster, chesster_state, init_chesster, "Fidelity Electronics", "Kishon Chesster (v2.3)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||
SYST( 1991, kishona, chesster, 0, kishon, chesster, chesster_state, init_chesster, "Fidelity Electronics", "Kishon Chesster (v2.2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
|
||||
SYST( 1990, chesster, 0, 0, chesster, chesster, chesster_state, empty_init, "Fidelity Electronics", "Chesster Challenger (v1.3)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||
SYST( 1990, chesstera, chesster, 0, chesster, chesster, chesster_state, empty_init, "Fidelity Electronics", "Chesster Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||
SYST( 1991, kishon, chesster, 0, kishon, chesster, chesster_state, empty_init, "Fidelity Electronics", "Kishon Chesster (v2.3)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||
SYST( 1991, kishona, chesster, 0, kishon, chesster, chesster_state, empty_init, "Fidelity Electronics", "Kishon Chesster (v2.2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||
|
@ -374,7 +374,7 @@ authors:hap
|
||||
<element name="text_r8a"><text string="Go"><color red="0.3" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_r8b"><text string=" "></text></element>
|
||||
|
||||
<element name="text_n1b"><text string="Gambit Book" align="1"><color red="0.51" green="0.5" blue="0.49" /></text></element>
|
||||
<element name="text_n1b"><text string=" " align="1"></text></element>
|
||||
<element name="text_n2b"><text string="Infinite" align="1"><color red="0.51" green="0.5" blue="0.49" /></text></element>
|
||||
<element name="text_n3b"><text string="Info" align="1"><color red="0.51" green="0.5" blue="0.49" /></text></element>
|
||||
<element name="text_n4b"><text string="Review" align="1"><color red="0.51" green="0.5" blue="0.49" /></text></element>
|
||||
@ -383,13 +383,15 @@ authors:hap
|
||||
<element name="text_n7b"><text string=" " align="1"></text></element>
|
||||
<element name="text_n8b"><text string=" " align="1"></text></element>
|
||||
|
||||
<element name="text_m1c"><text string="Gambit" align="1"><color red="0.51" green="0.5" blue="0.49" /></text></element>
|
||||
<element name="text_m1d"><text string="Book" align="1"><color red="0.51" green="0.5" blue="0.49" /></text></element>
|
||||
<element name="text_m4c"><text string="Best Move/"><color red="0.51" green="0.5" blue="0.49" /></text></element>
|
||||
<element name="text_m4d"><text string="Random"><color red="0.51" green="0.5" blue="0.49" /></text></element>
|
||||
<element name="text_m5c"><text string="Restore" align="1"><color red="0.51" green="0.5" blue="0.49" /></text></element>
|
||||
<element name="text_m5d"><text string="Game" align="1"><color red="0.51" green="0.5" blue="0.49" /></text></element>
|
||||
<element name="text_m6c"><text string="Tournament" align="1"><color red="0.51" green="0.5" blue="0.49" /></text></element>
|
||||
<element name="text_m6d"><text string="Book" align="1"><color red="0.51" green="0.5" blue="0.49" /></text></element>
|
||||
<element name="text_r2c"><text string="Pro-op Book" align="1"><color red="0.51" green="0.5" blue="0.49" /></text></element>
|
||||
<element name="text_r2c"><text string="Pro-op Book/" align="1"><color red="0.51" green="0.5" blue="0.49" /></text></element>
|
||||
<element name="text_r2d"><text string="Both Books" align="1"><color red="0.51" green="0.5" blue="0.49" /></text></element>
|
||||
|
||||
<element name="text_p1"><image file="chess/wk.svg"></image></element>
|
||||
@ -431,6 +433,8 @@ authors:hap
|
||||
|
||||
<element ref="text_r2c"><bounds x="23.2" y="21.757" width="10" height="1.2" /></element>
|
||||
<element ref="text_r2d"><bounds x="23.2" y="22.757" width="10" height="1.2" /></element>
|
||||
<element ref="text_m1c"><bounds x="17" y="13.7" width="10" height="1.2" /></element>
|
||||
<element ref="text_m1d"><bounds x="17" y="14.7" width="10" height="1.2" /></element>
|
||||
<element ref="text_m4c"><bounds xc="18" y="31.771" width="10" height="1.2" /></element>
|
||||
<element ref="text_m4d"><bounds xc="18" y="32.771" width="10" height="1.2" /></element>
|
||||
<element ref="text_m5c"><bounds x="17" y="45.929" width="10" height="1.2" /></element>
|
||||
|
@ -374,7 +374,7 @@ authors:hap
|
||||
<element name="text_r8a"><text string="Go"><color red="0.01" green="0.01" blue="0.01" /></text></element>
|
||||
<element name="text_r8b"><text string=" "></text></element>
|
||||
|
||||
<element name="text_l8c"><text string="Next Best"><color red="0.01" green="0.01" blue="0.01" /></text></element>
|
||||
<element name="text_l8c"><text string="Next Best/"><color red="0.01" green="0.01" blue="0.01" /></text></element>
|
||||
<element name="text_l8d"><text string="Take Back"><color red="0.01" green="0.01" blue="0.01" /></text></element>
|
||||
|
||||
<element name="text_p1"><image file="chess/wp.svg"></image></element>
|
||||
|
@ -156,7 +156,7 @@ void sdiamond_state::update_lcd()
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
// LCD common is 0/1/Hi-Z
|
||||
const u32 data = BIT(m_lcd_com, i + 4) ? (BIT(m_lcd_com, i) ? ~m_lcd_segs : m_lcd_segs) : 0;
|
||||
const u16 data = BIT(m_lcd_com, i + 4) ? (BIT(m_lcd_com, i) ? ~m_lcd_segs : m_lcd_segs) : 0;
|
||||
m_lcd_pwm->write_row(i, data);
|
||||
}
|
||||
}
|
||||
|
@ -291,8 +291,8 @@ void chessac_state::p7_w(u8 data)
|
||||
|
||||
static INPUT_PORTS_START( chessac )
|
||||
PORT_START("IN.0")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_NAME("Yes") PORT_CODE(KEYCODE_F1) // combine for NEW GAME
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("No") PORT_CODE(KEYCODE_F1) // "
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_CODE(KEYCODE_F1) PORT_NAME("Yes") // combine for NEW GAME
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_CODE(KEYCODE_F1) PORT_NAME("No") // "
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_P) PORT_NAME("Position")
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_NAME("Hint / Info")
|
||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_RIGHT) PORT_CODE(KEYCODE_B) PORT_NAME("Fwd / Black")
|
||||
@ -373,7 +373,7 @@ void chessac_state::chessac(machine_config &config)
|
||||
*******************************************************************************/
|
||||
|
||||
ROM_START( chessac )
|
||||
ROM_REGION( 0x8000, "maincpu", 0 )
|
||||
ROM_REGION16_BE( 0x8000, "maincpu", 0 )
|
||||
ROM_LOAD("97_saitek_86165400831_hd6433214a08f.u1", 0x0000, 0x8000, CRC(29d06d6a) SHA1(08b6f4093b240b0a34d9da67c9acffc576ba1d2d) )
|
||||
|
||||
ROM_REGION( 0x400000, "adpcm", 0 )
|
||||
|
@ -354,7 +354,7 @@ void prisma_state::prisma(machine_config &config)
|
||||
*******************************************************************************/
|
||||
|
||||
ROM_START( prisma )
|
||||
ROM_REGION( 0x8000, "maincpu", 0 )
|
||||
ROM_REGION16_BE( 0x8000, "maincpu", 0 )
|
||||
ROM_LOAD("90_saitek_86051150st9_3258l02p.u1", 0x0000, 0x8000, CRC(b6f8384f) SHA1(a4e8a4a45009c15bda1778512a87dea756aae6d8) )
|
||||
|
||||
ROM_REGION( 795951, "screen", 0 )
|
||||
|
Loading…
Reference in New Issue
Block a user