mirror of
https://github.com/holub/mame
synced 2025-04-20 23:42:22 +03:00
taito/taitojc.cpp: Fix character RAM size (#13379)
This commit is contained in:
parent
7b07d590ec
commit
9ceeaadbd3
@ -637,7 +637,7 @@ void taitojc_state::taitojc_map(address_map &map)
|
||||
map(0x00400000, 0x01bfffff).rom().region("maingfx", 0);
|
||||
map(0x04000000, 0x040f7fff).ram().share(m_vram);
|
||||
map(0x040f8000, 0x040fbfff).ram().w(FUNC(taitojc_state::tile_w)).share(m_tile_ram);
|
||||
map(0x040fc000, 0x040fefff).ram().w(FUNC(taitojc_state::char_w)).share(m_char_ram);
|
||||
map(0x040fc000, 0x040fefff).rw(FUNC(taitojc_state::char_r), FUNC(taitojc_state::char_w));
|
||||
map(0x040ff000, 0x040fffff).ram().share(m_objlist);
|
||||
map(0x05800000, 0x0580003f).r(FUNC(taitojc_state::pcbid_r));
|
||||
map(0x05900000, 0x05900007).rw(FUNC(taitojc_state::mcu_comm_r), FUNC(taitojc_state::mcu_comm_w));
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
, m_main_ram(*this, "main_ram")
|
||||
, m_dsp_shared_ram(*this, "dsp_shared")
|
||||
, m_tile_ram(*this, "tile_ram")
|
||||
, m_char_ram(*this, "char_ram")
|
||||
, m_char_ram(*this, "char_ram", 0x4000, ENDIANNESS_BIG)
|
||||
, m_analog_ports(*this, "AN.%u", 0)
|
||||
, m_lamps(*this, "lamp%u", 0U)
|
||||
, m_counters(*this, "counter%u", 0U)
|
||||
@ -69,7 +69,7 @@ protected:
|
||||
required_shared_ptr<uint32_t> m_main_ram;
|
||||
required_shared_ptr<uint16_t> m_dsp_shared_ram;
|
||||
required_shared_ptr<uint32_t> m_tile_ram;
|
||||
required_shared_ptr<uint32_t> m_char_ram;
|
||||
memory_share_creator<uint32_t> m_char_ram;
|
||||
|
||||
optional_ioport_array<8> m_analog_ports;
|
||||
|
||||
@ -129,6 +129,7 @@ protected:
|
||||
|
||||
void tile_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
|
||||
void char_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
|
||||
uint32_t char_r(offs_t offset);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_tile_info);
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
@ -43,6 +43,11 @@ void taitojc_state::char_w(offs_t offset, uint32_t data, uint32_t mem_mask)
|
||||
m_gfxdecode->gfx(0)->mark_dirty(offset/32);
|
||||
}
|
||||
|
||||
uint32_t taitojc_state::char_r(offs_t offset)
|
||||
{
|
||||
return m_char_ram[offset];
|
||||
}
|
||||
|
||||
// Object data format:
|
||||
//
|
||||
// 0x00: xxxxxx-- -------- -------- -------- Height
|
||||
@ -99,11 +104,8 @@ void taitojc_state::draw_object(bitmap_ind16 &bitmap, const rectangle &cliprect,
|
||||
if (BIT(w2, 14))
|
||||
address |= 0x40000;
|
||||
|
||||
int x = ((w1 >> 0) & 0x3ff);
|
||||
x = util::sext(x, 10); // sign-extend
|
||||
|
||||
int y = ((w1 >> 16) & 0x3ff);
|
||||
y = util::sext(y, 10); // sign-extend
|
||||
int x = util::sext(w1, 10);
|
||||
int y = util::sext(w1 >> 16, 10);
|
||||
|
||||
int width = ((w1 >> 10) & 0x3f) << 4;
|
||||
int height = ((w1 >> 26) & 0x3f) << 4;
|
||||
@ -113,7 +115,7 @@ void taitojc_state::draw_object(bitmap_ind16 &bitmap, const rectangle &cliprect,
|
||||
uint32_t const *v;
|
||||
if (address >= 0xff000)
|
||||
v = &m_objlist[(address - 0xff000) / 4];
|
||||
if (address >= 0xfc000)
|
||||
else if (address >= 0xfc000)
|
||||
v = &m_char_ram[(address - 0xfc000) / 4];
|
||||
else if (address >= 0xf8000)
|
||||
v = &m_tile_ram[(address - 0xf8000) / 4];
|
||||
|
Loading…
Reference in New Issue
Block a user