summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Michael Zapf <github@mizapf.de>2021-08-14 00:45:09 +0200
committer Michael Zapf <github@mizapf.de>2021-08-14 00:47:50 +0200
commitd4daff7cb3983948b74805d8c472547564d227ea (patch)
tree443d695e3125eecb0d019715d9a7e1310f3035c9
parent68a2d05d777b22a50a137b0e1527792c4fcacf2c (diff)
ti99: Use offs_t instead of uint16_t for addresses, as they are 19 bit wide in the peribox.
-rw-r--r--src/devices/bus/ti99/peb/cc_fdc.cpp10
-rw-r--r--src/devices/bus/ti99/peb/cc_fdc.h2
-rw-r--r--src/devices/bus/ti99/peb/myarcfdc.cpp14
-rw-r--r--src/devices/bus/ti99/peb/myarcfdc.h2
-rw-r--r--src/devices/bus/ti99/peb/pcode.cpp2
-rw-r--r--src/devices/bus/ti99/peb/pcode.h2
-rw-r--r--src/devices/bus/ti99/peb/pgram.cpp8
7 files changed, 20 insertions, 20 deletions
diff --git a/src/devices/bus/ti99/peb/cc_fdc.cpp b/src/devices/bus/ti99/peb/cc_fdc.cpp
index 12153fa1d28..c2b20e778a8 100644
--- a/src/devices/bus/ti99/peb/cc_fdc.cpp
+++ b/src/devices/bus/ti99/peb/cc_fdc.cpp
@@ -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;
diff --git a/src/devices/bus/ti99/peb/cc_fdc.h b/src/devices/bus/ti99/peb/cc_fdc.h
index 9b3ad6fa4ab..179ba10e0e5 100644
--- a/src/devices/bus/ti99/peb/cc_fdc.h
+++ b/src/devices/bus/ti99/peb/cc_fdc.h
@@ -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();
diff --git a/src/devices/bus/ti99/peb/myarcfdc.cpp b/src/devices/bus/ti99/peb/myarcfdc.cpp
index 7e7d6abd318..8c1410bb848 100644
--- a/src/devices/bus/ti99/peb/myarcfdc.cpp
+++ b/src/devices/bus/ti99/peb/myarcfdc.cpp
@@ -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())
{
diff --git a/src/devices/bus/ti99/peb/myarcfdc.h b/src/devices/bus/ti99/peb/myarcfdc.h
index e4f59027244..6917d67c146 100644
--- a/src/devices/bus/ti99/peb/myarcfdc.h
+++ b/src/devices/bus/ti99/peb/myarcfdc.h
@@ -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();
diff --git a/src/devices/bus/ti99/peb/pcode.cpp b/src/devices/bus/ti99/peb/pcode.cpp
index 48618f2dbea..c7f10650995 100644
--- a/src/devices/bus/ti99/peb/pcode.cpp
+++ b/src/devices/bus/ti99/peb/pcode.cpp
@@ -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))
diff --git a/src/devices/bus/ti99/peb/pcode.h b/src/devices/bus/ti99/peb/pcode.h
index c8afea6b053..dd1ce542d1a 100644
--- a/src/devices/bus/ti99/peb/pcode.h
+++ b/src/devices/bus/ti99/peb/pcode.h
@@ -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;
diff --git a/src/devices/bus/ti99/peb/pgram.cpp b/src/devices/bus/ti99/peb/pgram.cpp
index 47ea13db0bb..851a7bcee4a 100644
--- a/src/devices/bus/ti99/peb/pgram.cpp
+++ b/src/devices/bus/ti99/peb/pgram.cpp
@@ -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)