mirror of
https://github.com/holub/mame
synced 2025-04-22 00:11:58 +03:00
ti99: Use offs_t instead of uint16_t for addresses, as they are 19 bit wide in the peribox.
This commit is contained in:
parent
68a2d05d77
commit
d4daff7cb3
@ -102,7 +102,7 @@ void corcomp_fdc_device::setaddress_dbin(offs_t offset, int state)
|
||||
/*
|
||||
Provides the current address to the PALs.
|
||||
*/
|
||||
uint16_t corcomp_fdc_device::get_address()
|
||||
offs_t corcomp_fdc_device::get_address()
|
||||
{
|
||||
return m_address;
|
||||
}
|
||||
@ -133,7 +133,7 @@ bool corcomp_fdc_device::write_access()
|
||||
*/
|
||||
void corcomp_fdc_device::debug_read(offs_t offset, uint8_t* value)
|
||||
{
|
||||
uint16_t saveaddress = m_address;
|
||||
offs_t saveaddress = m_address;
|
||||
|
||||
m_address = offset;
|
||||
*value = 0x00;
|
||||
@ -147,7 +147,7 @@ void corcomp_fdc_device::debug_read(offs_t offset, uint8_t* value)
|
||||
if (m_ctrlpal->selectdsr())
|
||||
{
|
||||
// EPROM selected
|
||||
uint16_t base = m_banksel? 0x2000 : 0;
|
||||
offs_t base = m_banksel? 0x2000 : 0;
|
||||
uint8_t* rom = &m_dsrrom[base | (m_address & 0x1fff)];
|
||||
*value = *rom;
|
||||
}
|
||||
@ -156,7 +156,7 @@ void corcomp_fdc_device::debug_read(offs_t offset, uint8_t* value)
|
||||
|
||||
void corcomp_fdc_device::debug_write(offs_t offset, uint8_t data)
|
||||
{
|
||||
uint16_t saveaddress = m_address;
|
||||
offs_t saveaddress = m_address;
|
||||
m_address = offset;
|
||||
if (m_ctrlpal->selectram())
|
||||
{
|
||||
@ -219,7 +219,7 @@ void corcomp_fdc_device::readz(offs_t offset, uint8_t *value)
|
||||
if (m_ctrlpal->selectdsr())
|
||||
{
|
||||
// EPROM selected
|
||||
uint16_t base = m_banksel? 0x2000 : 0;
|
||||
offs_t base = m_banksel? 0x2000 : 0;
|
||||
uint8_t* rom = &m_dsrrom[base | (m_address & 0x1fff)];
|
||||
*value = *rom;
|
||||
|
||||
|
@ -84,7 +84,7 @@ protected:
|
||||
bool ready_trap_active();
|
||||
|
||||
// Deliver the current state of the address bus
|
||||
uint16_t get_address();
|
||||
offs_t get_address();
|
||||
|
||||
// Wait state logic
|
||||
void operate_ready_line();
|
||||
|
@ -84,7 +84,7 @@ bool myarc_fdc_device::card_selected()
|
||||
/*
|
||||
Provides the current address to the PAL.
|
||||
*/
|
||||
uint16_t myarc_fdc_device::get_address()
|
||||
offs_t myarc_fdc_device::get_address()
|
||||
{
|
||||
return m_address;
|
||||
}
|
||||
@ -94,7 +94,7 @@ uint16_t myarc_fdc_device::get_address()
|
||||
*/
|
||||
void myarc_fdc_device::debug_read(offs_t offset, uint8_t* value)
|
||||
{
|
||||
uint16_t addrcopy = m_address;
|
||||
offs_t addrcopy = m_address;
|
||||
m_address = offset;
|
||||
if (m_pal->ramsel())
|
||||
{
|
||||
@ -104,7 +104,7 @@ void myarc_fdc_device::debug_read(offs_t offset, uint8_t* value)
|
||||
if (m_pal->romen())
|
||||
{
|
||||
// EPROM selected
|
||||
uint16_t base = m_banksel? 0x1000 : 0;
|
||||
offs_t base = m_banksel? 0x1000 : 0;
|
||||
*value = m_dsrrom[base | (m_address & 0x0fff)];
|
||||
}
|
||||
m_address = addrcopy;
|
||||
@ -115,7 +115,7 @@ void myarc_fdc_device::debug_read(offs_t offset, uint8_t* value)
|
||||
*/
|
||||
void myarc_fdc_device::debug_write(offs_t offset, uint8_t data)
|
||||
{
|
||||
uint16_t addrcopy = m_address;
|
||||
offs_t addrcopy = m_address;
|
||||
m_address = offset;
|
||||
if (m_pal->ramsel())
|
||||
{
|
||||
@ -145,7 +145,7 @@ void myarc_fdc_device::readz(offs_t offset, uint8_t *value)
|
||||
if (m_pal->romen())
|
||||
{
|
||||
// EPROM selected
|
||||
uint16_t base = m_banksel? 0x1000 : 0;
|
||||
offs_t base = m_banksel? 0x1000 : 0;
|
||||
uint8_t* rom = &m_dsrrom[base | (m_address & 0x0fff)];
|
||||
*value = *rom;
|
||||
|
||||
@ -196,7 +196,7 @@ void myarc_fdc_device::write(offs_t offset, uint8_t data)
|
||||
void myarc_fdc_device::crureadz(offs_t offset, uint8_t *value)
|
||||
{
|
||||
const uint8_t dipswitch[] = { 0x00, 0x01, 0x02, 0x04, 0x08 };
|
||||
uint16_t addrcopy = m_address;
|
||||
offs_t addrcopy = m_address;
|
||||
m_address = offset; // Copy the CRU address on the address variable
|
||||
if (m_pal->cs251())
|
||||
{
|
||||
@ -229,7 +229,7 @@ void myarc_fdc_device::crureadz(offs_t offset, uint8_t *value)
|
||||
*/
|
||||
void myarc_fdc_device::cruwrite(offs_t offset, uint8_t data)
|
||||
{
|
||||
uint16_t addrcopy = m_address;
|
||||
offs_t addrcopy = m_address;
|
||||
m_address = offset; // Copy the CRU address on the address variable
|
||||
if (m_pal->cs259())
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ private:
|
||||
DECLARE_WRITE_LINE_MEMBER( drivesel_w );
|
||||
|
||||
// Deliver the current state of the address bus
|
||||
uint16_t get_address();
|
||||
offs_t get_address();
|
||||
|
||||
// Polled from the PAL
|
||||
bool card_selected();
|
||||
|
@ -142,7 +142,7 @@ void ti_pcode_card_device::setaddress_dbin(offs_t offset, int state)
|
||||
}
|
||||
}
|
||||
|
||||
void ti_pcode_card_device::debugger_read(uint16_t offset, uint8_t& value)
|
||||
void ti_pcode_card_device::debugger_read(offs_t offset, uint8_t& value)
|
||||
{
|
||||
// The debuger does not call setaddress
|
||||
if (m_active && in_dsr_space(offset, true))
|
||||
|
@ -51,7 +51,7 @@ private:
|
||||
DECLARE_WRITE_LINE_MEMBER(pcpage_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(ekrpg_w);
|
||||
|
||||
void debugger_read(uint16_t addr, uint8_t& value);
|
||||
void debugger_read(offs_t addr, uint8_t& value);
|
||||
|
||||
required_device_array<tmc0430_device, 8> m_groms;
|
||||
|
||||
|
@ -248,8 +248,8 @@ void pgram_device::dsr_ram_read(offs_t offset, uint8_t *value)
|
||||
m_bankff->clear_w(m_crulatch->q3_r());
|
||||
m_bankff->preset_w(m_crulatch->q4_r());
|
||||
|
||||
uint16_t base = (offset & 0x2000)<<1; // DSR:0000, RAM:4000
|
||||
uint16_t address = base | (offset & 0x1fff) | (m_bankff->output_r()? 0x2000 : 0);
|
||||
offs_t base = (offset & 0x2000)<<1; // DSR:0000, RAM:4000
|
||||
offs_t address = base | (offset & 0x1fff) | (m_bankff->output_r()? 0x2000 : 0);
|
||||
|
||||
if ((dsr && m_crulatch->q0_r()) || (!dsr && m_crulatch->q1_r()))
|
||||
{
|
||||
@ -294,8 +294,8 @@ void pgram_device::dsr_ram_write(offs_t offset, uint8_t data)
|
||||
|
||||
if (m_crulatch->q2_r()==0) // not write-protected
|
||||
{
|
||||
uint16_t base = (offset & 0x2000)<<1;
|
||||
uint16_t address = base | (offset & 0x1fff) | (m_bankff->output_r()? 0x2000 : 0);
|
||||
offs_t base = (offset & 0x2000)<<1;
|
||||
offs_t address = base | (offset & 0x1fff) | (m_bankff->output_r()? 0x2000 : 0);
|
||||
|
||||
m_dsrram->write(address, data);
|
||||
if (base==0)
|
||||
|
Loading…
Reference in New Issue
Block a user