Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
target-platform: [ATARI, ATARI-esp32-s3-wroom-1-n16r8, ADAM, APPLE, IEC-LOLIN-D32, IEC-NUGGET, COCO]
target-platform:
- ADAM
- APPLE
- ATARI
- ATARI-esp32-s3-wroom-1-n16r8
- COCO
- IEC-LOLIN-D32
- IEC-NUGGET
- RS232

steps:
- name: Checkout Source
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
target-platform: [ATARI, ATARI-8mb, ADAM, APPLE, COCO, IEC-LOLIN-D32, MASTERIES-REVAB, MASTERIES-REVA-SPIFIX, RS232]
target-platform:
- ADAM
- APPLE
- ATARI
- ATARI-8mb
- COCO
- IEC-LOLIN-D32
- MASTERIES-REVA-SPIFIX
- MASTERIES-REVAB
- RS232
env:
TAG_NAME: ${{ github.event.inputs.tag || github.ref_name }}

Expand Down
6 changes: 3 additions & 3 deletions lib/bus/rs232/rs232.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ void virtualDevice::rs232_error()
void virtualDevice::rs232_high_speed()
{
Debug_print("rs232 HRS232 INDEX\n");
uint8_t hsd = RS232.getHighSpeedIndex();
uint8_t hsd = SYSTEM_BUS.getHighSpeedIndex();
bus_to_computer((uint8_t *)&hsd, 1, false);
}

Expand Down Expand Up @@ -265,7 +265,7 @@ void systemBus::service()
{
_cpmDev->rs232_handle_cpm();
return; // break!
}
}

// Go process a command frame if the RS232 CMD line is asserted
if (fnSystem.digital_read(PIN_RS232_DTR) == DIGI_LOW)
Expand Down Expand Up @@ -321,7 +321,7 @@ void systemBus::setup()

fnSystem.set_pin_mode(PIN_RS232_DSR,gpio_mode_t::GPIO_MODE_OUTPUT);
fnSystem.digital_write(PIN_RS232_DSR,DIGI_LOW);

// Create a message queue
qRs232Messages = xQueueCreate(4, sizeof(rs232_message_t));

Expand Down
2 changes: 1 addition & 1 deletion lib/bus/rs232/rs232.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class virtualDevice
virtual void rs232_status() = 0;

/**
* @brief All RS232 devices repeatedly call this routine to fan out to other methods for each command.
* @brief All RS232 devices repeatedly call this routine to fan out to other methods for each command.
* This is typcially implemented as a switch() statement.
*/
virtual void rs232_process(cmdFrame_t *cmd_ptr) = 0;
Expand Down
34 changes: 16 additions & 18 deletions lib/device/rs232/fuji.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,22 @@ void rs232Fuji::rs232_status()

if (cmdFrame.aux == STATUS_MOUNT_TIME)
{
// Return drive slot mount status: 0 if unmounted, otherwise time when mounted
// Return drive slot mount status: 0 if unmounted, otherwise time when mounted
time_t mount_status[MAX_DISK_DEVICES];
int idx;
int idx;


for (idx = 0; idx < MAX_DISK_DEVICES; idx++)
mount_status[idx] = _fnDisks[idx].disk_dev.mount_time;
for (idx = 0; idx < MAX_DISK_DEVICES; idx++)
mount_status[idx] = _fnDisks[idx].disk_dev.mount_time;

bus_to_computer((uint8_t *) mount_status, sizeof(mount_status), false);
bus_to_computer((uint8_t *) mount_status, sizeof(mount_status), false);
}
else
{
char ret[4] = {0};
char ret[4] = {0};

Debug_printf("Status for what? %08lx\n", cmdFrame.aux);
bus_to_computer((uint8_t *)ret, sizeof(ret), false);
Debug_printf("Status for what? %08lx\n", cmdFrame.aux);
bus_to_computer((uint8_t *)ret, sizeof(ret), false);
}
return;
}
Expand Down Expand Up @@ -749,11 +749,11 @@ void rs232Fuji::image_rotate()
{
int swap = _fnDisks[n - 1].disk_dev.id();
Debug_printf("setting slot %d to ID %hx\n", n, swap);
_rs232_bus->changeDeviceId(&_fnDisks[n].disk_dev, swap);
SYSTEM_BUS.changeDeviceId(&_fnDisks[n].disk_dev, swap);
}

// The first slot gets the device ID of the last slot
_rs232_bus->changeDeviceId(&_fnDisks[0].disk_dev, last_id);
SYSTEM_BUS.changeDeviceId(&_fnDisks[0].disk_dev, last_id);

// Say whatever disk is in D1:
if (Config.get_general_rotation_sounds())
Expand Down Expand Up @@ -1392,11 +1392,11 @@ void rs232Fuji::rs232_set_rs232_external_clock()

if (speed == 0)
{
RS232.setUltraHigh(false, 0);
SYSTEM_BUS.setUltraHigh(false, 0);
}
else
{
RS232.setUltraHigh(true, baudRate);
SYSTEM_BUS.setUltraHigh(true, baudRate);
}

rs232_complete();
Expand Down Expand Up @@ -1454,16 +1454,14 @@ void rs232Fuji::rs232_enable_udpstream()
rs232_complete();

// Start the UDP Stream
RS232.setUDPHost(host, port);
SYSTEM_BUS.setUDPHost(host, port);
}
}

// Initializes base settings and adds our devices to the RS232 bus
void rs232Fuji::setup(systemBus *rs232bus)
void rs232Fuji::setup()
{
// set up Fuji device
_rs232_bus = rs232bus;

_populate_slots_from_config();

insert_boot_device(Config.get_general_boot_mode());
Expand All @@ -1476,10 +1474,10 @@ void rs232Fuji::setup(systemBus *rs232bus)

// Add our devices to the RS232 bus
for (int i = 0; i < MAX_DISK_DEVICES; i++)
_rs232_bus->addDevice(&_fnDisks[i].disk_dev, RS232_DEVICEID_DISK + i);
SYSTEM_BUS.addDevice(&_fnDisks[i].disk_dev, RS232_DEVICEID_DISK + i);

for (int i = 0; i < MAX_NETWORK_DEVICES; i++)
_rs232_bus->addDevice(&rs232NetDevs[i], RS232_DEVICEID_FN_NETWORK + i);
SYSTEM_BUS.addDevice(&rs232NetDevs[i], RS232_DEVICEID_FN_NETWORK + i);

}

Expand Down
12 changes: 6 additions & 6 deletions lib/device/rs232/modem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ void rs232Modem::rs232_poll_1()
Send back RS232 command for booting. This is a 12 uint8_t + chk block that
is meant to be written to the RS232 parameter block starting at DDEVIC ($0300).

The boot block MUST start at $0500. There are both BASIC-based and cart-based
The boot block MUST start at $0500. There are both BASIC-based and cart-based
loaders that use JSR $0506 to run the loader.
*/

Expand Down Expand Up @@ -427,7 +427,7 @@ void rs232Modem::rs232_control()
tcpClient.stop(); // Hang up if DTR drops.
CRX = false;
cmdMode = true;

if (listenPort > 0)
{
// tcpServer.stop();
Expand Down Expand Up @@ -1476,8 +1476,8 @@ void rs232Modem::modemCommand()
break;
case AT_CPM:
modemActive = false;
RS232.getCPM()->init_cpm(modemBaud);
RS232.getCPM()->cpmActive = true;
SYSTEM_BUS.getCPM()->init_cpm(modemBaud);
SYSTEM_BUS.getCPM()->cpmActive = true;
break;
case AT_PHONEBOOKLIST:
at_handle_pblist();
Expand Down Expand Up @@ -1679,7 +1679,7 @@ void rs232Modem::rs232_handle_modem()
// Read from serial, the amount available up to
// maximum size of the buffer
int rs232BytesRead = fnUartBUS.readBytes(&txBuf[0], //RS232_UART.readBytes(&txBuf[0],
(rs232BytesAvail > TX_BUF_SIZE) ? TX_BUF_SIZE : rs232BytesAvail);
(rs232BytesAvail > TX_BUF_SIZE) ? TX_BUF_SIZE : rs232BytesAvail);

// Disconnect if going to AT mode with "+++" sequence
for (int i = 0; i < (int)rs232BytesRead; i++)
Expand Down Expand Up @@ -1747,7 +1747,7 @@ void rs232Modem::rs232_handle_modem()
Debug_println("Going back to command mode");

at_cmd_println("OK");

cmdMode = true;

plusCount = 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/device/rs232/rs232cpm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void rs232CPM::rs232_handle_cpm()

void rs232CPM::init_cpm(int baud)
{
fnUartBUS.set_baudrate(baud);
SYSTEM_BUS.setBaudrate(baud);
Status = Debug = 0;
Break = Step = -1;
RAM = (uint8_t *)malloc(MEMSIZE);
Expand Down
2 changes: 1 addition & 1 deletion lib/hardware/fnUART.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void UARTManager::begin(int baud)
// If using an older Rev0 or Rev00 board, you will need to pull PIN_EPROM_A14 (IO36) up to 3.3V or 5V via a 10K
// resistor to have it default to the previous default of 57600 baud otherwise they will both read as low and you
// will get 38400 baud.

fnSystem.set_pin_mode(PIN_EPROM_A14, gpio_mode_t::GPIO_MODE_INPUT, SystemManager::pull_updown_t::PULL_NONE);
fnSystem.set_pin_mode(PIN_EPROM_A15, gpio_mode_t::GPIO_MODE_INPUT, SystemManager::pull_updown_t::PULL_NONE);

Expand Down
Loading