mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
Fix some fallout (nw)
This commit is contained in:
parent
4cd51b6ecc
commit
f06e0b5cd5
@ -82,22 +82,20 @@ READ8_MEMBER(mexico86_state::kiki_ym2203_r)
|
||||
|
||||
static ADDRESS_MAP_START( mexico86_map, AS_PROGRAM, 8, mexico86_state )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") /* banked roms */
|
||||
AM_RANGE(0xc000, 0xd4ff) AM_RAM AM_SHARE("videoram")
|
||||
AM_RANGE(0xd500, 0xd7ff) AM_RAM AM_SHARE("objectram")
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE("share1") /* shared with sound cpu */
|
||||
AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") /* banked roms */
|
||||
AM_RANGE(0xc000, 0xe7ff) AM_RAM AM_SHARE("mainram") /* shared with sound cpu */
|
||||
AM_RANGE(0xe800, 0xe8ff) AM_RAM AM_SHARE("protection_ram") /* shared with mcu */
|
||||
AM_RANGE(0xe900, 0xefff) AM_RAM
|
||||
AM_RANGE(0xf000, 0xf000) AM_WRITE(mexico86_bankswitch_w) /* program and gfx ROM banks */
|
||||
AM_RANGE(0xf008, 0xf008) AM_WRITE(mexico86_f008_w) /* cpu reset lines + other unknown stuff */
|
||||
AM_RANGE(0xf010, 0xf010) AM_READ_PORT("IN3")
|
||||
AM_RANGE(0xf018, 0xf018) AM_WRITENOP /* watchdog? */
|
||||
AM_RANGE(0xf800, 0xffff) AM_RAM AM_SHARE("share2") /* communication ram - to connect 4 players's subboard */
|
||||
AM_RANGE(0xf800, 0xffff) AM_RAM AM_SHARE("subram") /* communication ram - to connect 4 players's subboard */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( mexico86_sound_map, AS_PROGRAM, 8, mexico86_state )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0xa7ff) AM_RAM AM_SHARE("share1")
|
||||
AM_RANGE(0x8000, 0xa7ff) AM_RAM AM_SHARE("mainram") /* shared with main */
|
||||
AM_RANGE(0xa800, 0xbfff) AM_RAM
|
||||
AM_RANGE(0xc000, 0xc001) AM_READ(kiki_ym2203_r) AM_DEVWRITE("ymsnd", ym2203_device, write)
|
||||
ADDRESS_MAP_END
|
||||
@ -113,7 +111,7 @@ WRITE8_MEMBER(mexico86_state::mexico86_sub_output_w)
|
||||
static ADDRESS_MAP_START( mexico86_sub_cpu_map, AS_PROGRAM, 8, mexico86_state )
|
||||
AM_RANGE(0x0000, 0x3fff) AM_ROM
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM /* sub cpu ram */
|
||||
AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("share2") /* shared with main */
|
||||
AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("subram") /* shared with main */
|
||||
AM_RANGE(0xc000, 0xc000) AM_READ_PORT("IN4")
|
||||
AM_RANGE(0xc001, 0xc001) AM_READ_PORT("IN5")
|
||||
AM_RANGE(0xc002, 0xc002) AM_READ_PORT("IN6")
|
||||
|
@ -267,8 +267,8 @@ READ16_MEMBER(segas1x_bootleg_state::passht4b_io3_r)
|
||||
static ADDRESS_MAP_START( passht4b_map, AS_PROGRAM, 16, segas1x_bootleg_state )
|
||||
AM_RANGE(0x000000, 0x01ffff) AM_ROM
|
||||
AM_RANGE(0x400000, 0x407fff) AM_RAM // tilemap ram on original, buffer on bootleg
|
||||
AM_RANGE(0x408000, 0x409fff) AM_RAM AM_SHARE("bg0_tileram")
|
||||
AM_RANGE(0x40a000, 0x40bfff) AM_RAM AM_SHARE("bg1_tileram")
|
||||
AM_RANGE(0x409000, 0x409fff) AM_RAM AM_SHARE("bg0_tileram")
|
||||
AM_RANGE(0x40a000, 0x40afff) AM_RAM AM_SHARE("bg1_tileram")
|
||||
AM_RANGE(0x410000, 0x410fff) AM_RAM AM_SHARE("textram")
|
||||
AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites")
|
||||
AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram")
|
||||
|
@ -279,7 +279,7 @@ static ADDRESS_MAP_START( ti83p_io, AS_IO, 8, ti85_state )
|
||||
AM_RANGE(0x0007, 0x0007) AM_READWRITE(ti86_port_0006_r, ti83p_port_0007_w )
|
||||
AM_RANGE(0x0010, 0x0010) AM_DEVREADWRITE("t6a04", t6a04_device, control_read, control_write)
|
||||
AM_RANGE(0x0011, 0x0011) AM_DEVREADWRITE("t6a04", t6a04_device, data_read, data_write)
|
||||
AM_RANGE(0x0014, 0x0014) AM_WRITE(ti83p_port_0014_w )
|
||||
// AM_RANGE(0x0014, 0x0014) AM_WRITE(ti83p_port_0014_w )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( ti83pse_io, AS_IO, 8, ti85_state )
|
||||
|
@ -11,9 +11,8 @@ class mexico86_state : public driver_device
|
||||
public:
|
||||
mexico86_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_objectram(*this, "objectram"),
|
||||
m_protection_ram(*this, "protection_ram"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_mainram(*this, "mainram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_subcpu(*this, "sub"),
|
||||
@ -25,9 +24,8 @@ public:
|
||||
}
|
||||
|
||||
/* memory pointers */
|
||||
required_shared_ptr<u8> m_objectram;
|
||||
required_shared_ptr<u8> m_protection_ram;
|
||||
required_shared_ptr<u8> m_videoram;
|
||||
required_shared_ptr<u8> m_mainram;
|
||||
|
||||
/* video-related */
|
||||
int m_charbank;
|
||||
|
@ -31,24 +31,24 @@ uint32_t mexico86_state::screen_update_mexico86(screen_device &screen, bitmap_in
|
||||
sx = 0;
|
||||
|
||||
/* the score display seems to be outside of the main objectram. */
|
||||
for (offs = 0; offs < m_objectram.bytes() + 0x200; offs += 4)
|
||||
for (offs = 0x1500; offs < 0x2000; offs += 4)
|
||||
{
|
||||
int height;
|
||||
|
||||
if (offs >= m_objectram.bytes() && offs < m_objectram.bytes() + 0x180)
|
||||
if (offs >= 0x1800 && offs < 0x1980)
|
||||
continue;
|
||||
|
||||
if (offs >= m_objectram.bytes() + 0x1c0)
|
||||
if (offs >= 0x19c0)
|
||||
continue;
|
||||
|
||||
/* skip empty sprites */
|
||||
/* this is dword aligned so the uint32_t * cast shouldn't give problems */
|
||||
/* on any architecture */
|
||||
if (*(uint32_t *)(&m_objectram[offs]) == 0)
|
||||
if (*(uint32_t *)(&m_mainram[offs]) == 0)
|
||||
continue;
|
||||
|
||||
gfx_num = m_objectram[offs + 1];
|
||||
gfx_attr = m_objectram[offs + 3];
|
||||
gfx_num = m_mainram[offs + 1];
|
||||
gfx_attr = m_mainram[offs + 3];
|
||||
|
||||
if (!BIT(gfx_num, 7)) /* 16x16 sprites */
|
||||
{
|
||||
@ -65,10 +65,10 @@ uint32_t mexico86_state::screen_update_mexico86(screen_device &screen, bitmap_in
|
||||
sx += 16;
|
||||
else
|
||||
{
|
||||
sx = m_objectram[offs + 2];
|
||||
sx = m_mainram[offs + 2];
|
||||
//if (gfx_attr & 0x40) sx -= 256;
|
||||
}
|
||||
sy = 256 - height * 8 - (m_objectram[offs + 0]);
|
||||
sy = 256 - height * 8 - (m_mainram[offs + 0]);
|
||||
|
||||
for (xc = 0; xc < 2; xc++)
|
||||
{
|
||||
@ -77,10 +77,10 @@ uint32_t mexico86_state::screen_update_mexico86(screen_device &screen, bitmap_in
|
||||
int goffs, code, color, flipx, flipy, x, y;
|
||||
|
||||
goffs = gfx_offs + xc * 0x40 + yc * 0x02;
|
||||
code = m_videoram[goffs] + ((m_videoram[goffs + 1] & 0x07) << 8)
|
||||
+ ((m_videoram[goffs + 1] & 0x80) << 4) + (m_charbank << 12);
|
||||
color = ((m_videoram[goffs + 1] & 0x38) >> 3) + ((gfx_attr & 0x02) << 2);
|
||||
flipx = m_videoram[goffs + 1] & 0x40;
|
||||
code = m_mainram[goffs] + ((m_mainram[goffs + 1] & 0x07) << 8)
|
||||
+ ((m_mainram[goffs + 1] & 0x80) << 4) + (m_charbank << 12);
|
||||
color = ((m_mainram[goffs + 1] & 0x38) >> 3) + ((gfx_attr & 0x02) << 2);
|
||||
flipx = m_mainram[goffs + 1] & 0x40;
|
||||
flipy = 0;
|
||||
|
||||
//x = sx + xc * 8;
|
||||
@ -109,15 +109,15 @@ uint32_t mexico86_state::screen_update_kikikai(screen_device &screen, bitmap_ind
|
||||
|
||||
bitmap.fill(m_palette->black_pen(), cliprect);
|
||||
sx = 0;
|
||||
for (offs = 0; offs < m_objectram.bytes(); offs += 4)
|
||||
for (offs = 0x1500; offs < 0x1800; offs += 4)
|
||||
{
|
||||
if (*(uint32_t*)(m_objectram + offs) == 0)
|
||||
if (*(uint32_t*)(m_mainram + offs) == 0)
|
||||
continue;
|
||||
|
||||
ty = m_objectram[offs];
|
||||
gfx_num = m_objectram[offs + 1];
|
||||
tx = m_objectram[offs + 2];
|
||||
//gfx_attr = m_objectram[offs + 3];
|
||||
ty = m_mainram[offs];
|
||||
gfx_num = m_mainram[offs + 1];
|
||||
tx = m_mainram[offs + 2];
|
||||
//gfx_attr = m_mainram[offs + 3];
|
||||
|
||||
if (gfx_num & 0x80)
|
||||
{
|
||||
@ -141,8 +141,8 @@ uint32_t mexico86_state::screen_update_kikikai(screen_device &screen, bitmap_ind
|
||||
{
|
||||
y = (sy + (yc << 2)) & 0xff;
|
||||
goffs = gfx_offs + yc;
|
||||
code = m_videoram[goffs] + ((m_videoram[goffs + 1] & 0x1f) << 8);
|
||||
color = (m_videoram[goffs + 1] & 0xe0) >> 5;
|
||||
code = m_mainram[goffs] + ((m_mainram[goffs + 1] & 0x1f) << 8);
|
||||
color = (m_mainram[goffs + 1] & 0xe0) >> 5;
|
||||
goffs += 0x40;
|
||||
|
||||
m_gfxdecode->gfx(0)->transpen(bitmap,cliprect,
|
||||
@ -151,8 +151,8 @@ uint32_t mexico86_state::screen_update_kikikai(screen_device &screen, bitmap_ind
|
||||
0,0,
|
||||
sx&0xff,y,15);
|
||||
|
||||
code = m_videoram[goffs] + ((m_videoram[goffs + 1] & 0x1f) << 8);
|
||||
color = (m_videoram[goffs + 1] & 0xe0) >> 5;
|
||||
code = m_mainram[goffs] + ((m_mainram[goffs + 1] & 0x1f) << 8);
|
||||
color = (m_mainram[goffs + 1] & 0xe0) >> 5;
|
||||
|
||||
m_gfxdecode->gfx(0)->transpen(bitmap,cliprect,
|
||||
code,
|
||||
|
Loading…
Reference in New Issue
Block a user