mirror of
https://github.com/holub/mame
synced 2025-06-05 20:33:45 +03:00
Fix validity check
This commit is contained in:
parent
8f71a37c56
commit
f3d21ad0c5
@ -18,6 +18,7 @@ const device_type M50458 = &device_creator<m50458_device>;
|
|||||||
|
|
||||||
static ADDRESS_MAP_START( m50458_vram, AS_0, 16, m50458_device )
|
static ADDRESS_MAP_START( m50458_vram, AS_0, 16, m50458_device )
|
||||||
AM_RANGE(0x0000, 0x023f) AM_RAM // vram
|
AM_RANGE(0x0000, 0x023f) AM_RAM // vram
|
||||||
|
AM_RANGE(0x0240, 0x0241) AM_WRITE(vreg_120_w)
|
||||||
AM_RANGE(0x024e, 0x024f) AM_WRITE(vreg_127_w)
|
AM_RANGE(0x024e, 0x024f) AM_WRITE(vreg_127_w)
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
@ -27,6 +28,10 @@ ROM_START( m50458 )
|
|||||||
ROM_LOAD("m50458_char.bin", 0x0000, 0x1200, BAD_DUMP CRC(011cc342) SHA1(d5b9f32d6e251b4b25945267d7c68c099bd83e96) )
|
ROM_LOAD("m50458_char.bin", 0x0000, 0x1200, BAD_DUMP CRC(011cc342) SHA1(d5b9f32d6e251b4b25945267d7c68c099bd83e96) )
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
|
WRITE16_MEMBER( m50458_device::vreg_120_w)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
WRITE16_MEMBER( m50458_device::vreg_127_w)
|
WRITE16_MEMBER( m50458_device::vreg_127_w)
|
||||||
{
|
{
|
||||||
if(data & 0x20) // RAMERS, display RAM is erased
|
if(data & 0x20) // RAMERS, display RAM is erased
|
||||||
@ -93,7 +98,7 @@ m50458_device::m50458_device(const machine_config &mconfig, const char *tag, dev
|
|||||||
device_memory_interface(mconfig, *this),
|
device_memory_interface(mconfig, *this),
|
||||||
m_space_config("videoram", ENDIANNESS_LITTLE, 16, 16, 0, NULL, *ADDRESS_MAP_NAME(m50458_vram))
|
m_space_config("videoram", ENDIANNESS_LITTLE, 16, 16, 0, NULL, *ADDRESS_MAP_NAME(m50458_vram))
|
||||||
{
|
{
|
||||||
|
m_shortname = "m50458";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -173,6 +178,7 @@ WRITE_LINE_MEMBER( m50458_device::set_clock_line )
|
|||||||
m_osd_state = OSD_SET_DATA;
|
m_osd_state = OSD_SET_DATA;
|
||||||
break;
|
break;
|
||||||
case OSD_SET_DATA:
|
case OSD_SET_DATA:
|
||||||
|
//if(m_osd_addr >= 0x120)
|
||||||
//printf("%04x %04x\n",m_osd_addr,m_current_cmd);
|
//printf("%04x %04x\n",m_osd_addr,m_current_cmd);
|
||||||
write_word(m_osd_addr,m_current_cmd);
|
write_word(m_osd_addr,m_current_cmd);
|
||||||
m_osd_addr++;
|
m_osd_addr++;
|
||||||
|
@ -29,6 +29,10 @@ typedef enum
|
|||||||
OSD_SET_DATA
|
OSD_SET_DATA
|
||||||
} m50458_state_t;
|
} m50458_state_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
UINT8 r,g,b;
|
||||||
|
} m50458_bg_t;
|
||||||
|
|
||||||
// ======================> m50458_device
|
// ======================> m50458_device
|
||||||
|
|
||||||
@ -43,6 +47,7 @@ public:
|
|||||||
WRITE_LINE_MEMBER( write_bit );
|
WRITE_LINE_MEMBER( write_bit );
|
||||||
WRITE_LINE_MEMBER( set_cs_line );
|
WRITE_LINE_MEMBER( set_cs_line );
|
||||||
WRITE_LINE_MEMBER( set_clock_line );
|
WRITE_LINE_MEMBER( set_clock_line );
|
||||||
|
DECLARE_WRITE16_MEMBER(vreg_120_w);
|
||||||
DECLARE_WRITE16_MEMBER(vreg_127_w);
|
DECLARE_WRITE16_MEMBER(vreg_127_w);
|
||||||
|
|
||||||
UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||||
@ -63,6 +68,8 @@ protected:
|
|||||||
UINT16 m_osd_addr;
|
UINT16 m_osd_addr;
|
||||||
|
|
||||||
m50458_state_t m_osd_state;
|
m50458_state_t m_osd_state;
|
||||||
|
m50458_bg_t m_m50458_bg;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
inline UINT16 read_word(offs_t address);
|
inline UINT16 read_word(offs_t address);
|
||||||
inline void write_word(offs_t address, UINT16 data);
|
inline void write_word(offs_t address, UINT16 data);
|
||||||
|
Loading…
Reference in New Issue
Block a user