2023-01-08 05:37:25 +00:00
|
|
|
#include <string.h>
|
|
|
|
#include <hardware/pio.h>
|
|
|
|
#include "common/config.h"
|
|
|
|
#include "common/buffers.h"
|
|
|
|
#include "abus.pio.h"
|
|
|
|
#include "diag/businterface.h"
|
|
|
|
|
2023-01-29 15:50:12 +00:00
|
|
|
void __time_critical_func(diag_businterface)(uint32_t address, uint32_t value) {
|
2023-01-08 05:37:25 +00:00
|
|
|
// Shadow parts of the Apple's memory by observing the bus write cycles
|
2023-01-29 15:50:12 +00:00
|
|
|
if((value & (1u << CONFIG_PIN_APPLEBUS_RW-CONFIG_PIN_APPLEBUS_DATA_BASE)) == 0) {
|
|
|
|
apple_memory[address] = value;
|
2023-01-08 05:37:25 +00:00
|
|
|
}
|
|
|
|
}
|