mirror of
https://github.com/holub/mame
synced 2025-04-24 17:30:55 +03:00
5clown: Document how to access the hidden settings table
- Use CRTC for rendering (nw)
This commit is contained in:
parent
ee771ac3e6
commit
d9b7b07edd
@ -314,6 +314,16 @@
|
||||
|
||||
|
||||
|
||||
To access Chance Settings, follow the following directions precisely:
|
||||
|
||||
Press SERVICE to get a black screen. (HOLD 5 will exit.)
|
||||
From this black screen, press BET to get a crosshatch pattern.
|
||||
Press PAYOUT once. (The screen will not change.)
|
||||
Then press BOOK 5 times, then HOLD 5 7 times, then SERVICE 2 times.
|
||||
If this sequence was successfully entered, the screen will now go black.
|
||||
Wait a few seconds for the settings table to appear.
|
||||
|
||||
|
||||
Settings Suggestions
|
||||
--------------------
|
||||
|
||||
@ -464,8 +474,8 @@ public:
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_ay8910(*this, "ay8910"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette"),
|
||||
m_gfxbanks(*this, "gfxbanks"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_colorram(*this, "colorram")
|
||||
{
|
||||
@ -477,15 +487,14 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void video_start() override;
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<ay8910_device> m_ay8910;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
required_region_ptr<uint8_t> m_gfxbanks;
|
||||
required_shared_ptr<uint8_t> m_videoram;
|
||||
required_shared_ptr<uint8_t> m_colorram;
|
||||
|
||||
@ -493,11 +502,8 @@ private:
|
||||
uint8_t m_snd_latch_0800;
|
||||
uint8_t m_snd_latch_0a02;
|
||||
uint8_t m_ay8910_addr;
|
||||
tilemap_t *m_bg_tilemap;
|
||||
int m_mux_data;
|
||||
|
||||
DECLARE_WRITE8_MEMBER(fclown_videoram_w);
|
||||
DECLARE_WRITE8_MEMBER(fclown_colorram_w);
|
||||
DECLARE_WRITE8_MEMBER(cpu_c048_w);
|
||||
DECLARE_WRITE8_MEMBER(cpu_d800_w);
|
||||
DECLARE_READ8_MEMBER(snd_e06_r);
|
||||
@ -510,9 +516,8 @@ private:
|
||||
DECLARE_READ8_MEMBER(pia0_b_r);
|
||||
DECLARE_READ8_MEMBER(pia1_b_r);
|
||||
void fclown_ay8910_w(offs_t offset, u8 data);
|
||||
TILE_GET_INFO_MEMBER(get_fclown_tile_info);
|
||||
MC6845_UPDATE_ROW(update_row);
|
||||
void _5clown_palette(palette_device &palette) const;
|
||||
uint32_t screen_update_fclown(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
|
||||
void fcaudio_map(address_map &map);
|
||||
void fclown_map(address_map &map);
|
||||
@ -535,20 +540,7 @@ void _5clown_state::machine_start()
|
||||
|
||||
|
||||
|
||||
WRITE8_MEMBER(_5clown_state::fclown_videoram_w)
|
||||
{
|
||||
m_videoram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(_5clown_state::fclown_colorram_w)
|
||||
{
|
||||
m_colorram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
|
||||
TILE_GET_INFO_MEMBER(_5clown_state::get_fclown_tile_info)
|
||||
MC6845_UPDATE_ROW(_5clown_state::update_row)
|
||||
{
|
||||
/* - bits -
|
||||
7654 3210
|
||||
@ -559,27 +551,27 @@ TILE_GET_INFO_MEMBER(_5clown_state::get_fclown_tile_info)
|
||||
x--- ---- Extra color for 7's.
|
||||
*/
|
||||
|
||||
int attr = m_colorram[tile_index];
|
||||
int code = ((attr & 0x01) << 8) | ((attr & 0x40) << 2) | m_videoram[tile_index]; /* bit 8 for extended char set */
|
||||
int bank = (attr & 0x02) >> 1; /* bit 1 switch the gfx banks */
|
||||
int color = (attr & 0x3c) >> 2 | ((attr & 0x80) >> 3); /* bits 2-3-4-5-7 for color */
|
||||
uint32_t *pix = &bitmap.pix32(y);
|
||||
ra &= 0x07;
|
||||
|
||||
SET_TILE_INFO_MEMBER(bank, code, color, 0);
|
||||
for (int x = 0; x < x_count; x++)
|
||||
{
|
||||
int tile_index = (x + ma) & m_videoram.mask();
|
||||
int attr = m_colorram[tile_index];
|
||||
int code = ((attr & 0x01) << 8) | ((attr & 0x40) << 2) | m_videoram[tile_index]; /* bit 8 for extended char set */
|
||||
int bank = (attr & 0x02) >> 1; /* bit 1 switch the gfx banks */
|
||||
int color = (attr & 0x3c) >> 2 | ((attr & 0x80) >> 3); /* bits 2-3-4-5-7 for color */
|
||||
|
||||
const uint8_t plane2 = bank ? m_gfxbanks[code << 3 | ra | 0x6000] : 0;
|
||||
const uint8_t plane1 = bank ? m_gfxbanks[code << 3 | ra | 0x5000] : 0;
|
||||
const uint8_t plane0 = m_gfxbanks[code << 3 | ra | (bank ? 0x4000 : 0x7000)];
|
||||
const pen_t *pens = &m_palette->pen(color << 3);
|
||||
for (int n = 7; n >= 0; n--)
|
||||
*pix++ = pens[BIT(plane2, n) << 2 | BIT(plane1, n) << 1 | BIT(plane0, n)];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void _5clown_state::video_start()
|
||||
{
|
||||
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(_5clown_state::get_fclown_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
||||
}
|
||||
|
||||
|
||||
uint32_t _5clown_state::screen_update_fclown(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void _5clown_state::_5clown_palette(palette_device &palette) const
|
||||
{
|
||||
/*
|
||||
@ -764,8 +756,8 @@ void _5clown_state::fclown_map(address_map &map)
|
||||
map(0x0801, 0x0801).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w));
|
||||
map(0x0844, 0x0847).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
|
||||
map(0x0848, 0x084b).rw("pia1", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
|
||||
map(0x1000, 0x13ff).ram().w(FUNC(_5clown_state::fclown_videoram_w)).share("videoram"); /* Init'ed at $2042 */
|
||||
map(0x1800, 0x1bff).ram().w(FUNC(_5clown_state::fclown_colorram_w)).share("colorram"); /* Init'ed at $2054 */
|
||||
map(0x1000, 0x13ff).ram().share("videoram"); /* Init'ed at $2042 */
|
||||
map(0x1800, 0x1bff).ram().share("colorram"); /* Init'ed at $2054 */
|
||||
map(0x2000, 0x7fff).rom(); /* ROM space */
|
||||
|
||||
map(0xc048, 0xc048).w(FUNC(_5clown_state::cpu_c048_w));
|
||||
@ -1044,13 +1036,10 @@ void _5clown_state::fclown(machine_config &config)
|
||||
|
||||
/* video hardware */
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
|
||||
screen.set_size((39+1)*8, (31+1)*8);
|
||||
screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1);
|
||||
screen.set_screen_update(FUNC(_5clown_state::screen_update_fclown));
|
||||
screen.set_raw(MASTER_CLOCK/2, 320, 0, 256, 312, 0, 256);
|
||||
screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
|
||||
|
||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_fclown);
|
||||
GFXDECODE(config, "gfxdecode", m_palette, gfx_fclown);
|
||||
PALETTE(config, m_palette, FUNC(_5clown_state::_5clown_palette), 256);
|
||||
|
||||
mc6845_device &crtc(MC6845(config, "crtc", MASTER_CLOCK/16)); /* guess */
|
||||
@ -1058,6 +1047,7 @@ void _5clown_state::fclown(machine_config &config)
|
||||
crtc.set_show_border_area(false);
|
||||
crtc.set_char_width(8);
|
||||
crtc.out_vsync_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
|
||||
crtc.set_update_row_callback(FUNC(_5clown_state::update_row), this);
|
||||
|
||||
/* sound hardware */
|
||||
SPEAKER(config, "mono").front_center();
|
||||
@ -1188,16 +1178,19 @@ void _5clown_state::init_fclown()
|
||||
for (int x = 0x2000; x < 0x3000; x++)
|
||||
{
|
||||
gfx1_src[x] = gfx1_src[x] ^ 0x22; /* Decrypting bulk GFX segment 7000-7fff */
|
||||
m_gfxbanks[0x7000 - 0x2000 + x] ^= 0x22;
|
||||
}
|
||||
|
||||
for (int x = 0x0000; x < 0x1000; x++)
|
||||
{
|
||||
gfx2_src[x] = gfx2_src[x] ^ 0x3f; /* Decrypting bulk GFX segment 6000-6fff */
|
||||
m_gfxbanks[0x6000 - 0x0000 + x] ^= 0x3f;
|
||||
}
|
||||
|
||||
for (int x = 0x2000; x < 0x3000; x++)
|
||||
{
|
||||
gfx2_src[x] = gfx2_src[x] ^ 0x22; /* Decrypting bulk GFX segment 4000-4fff */
|
||||
m_gfxbanks[0x4000 - 0x2000 + x] ^= 0x22;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user