Skip to content

Commit 5703be4

Browse files
committed
Revert "test"
This reverts commit be8ff6b.
1 parent be8ff6b commit 5703be4

File tree

2 files changed

+34
-35
lines changed

2 files changed

+34
-35
lines changed

sw/picocart64_v1/n64_pi_task.c

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -92,39 +92,39 @@ void n64_pi_run(void)
9292
if (last_addr >= CART_DOM1_ADDR2_START && last_addr <= CART_DOM1_ADDR2_END) {
9393
// Domain 1, Address 2 Cartridge ROM
9494

95-
// #if CONFIG_ROM_HEADER_OVERRIDE != 0
96-
// if (last_addr == 0x10000000) {
97-
// // Special case to patch PI access speed paramenters
98-
99-
// // 16 MSB
100-
// next_word = CONFIG_ROM_HEADER_OVERRIDE >> 16;
101-
// addr = n64_pi_get_value(pio);
102-
// if (addr == 0) {
103-
// // READ
104-
// pio_sm_put(pio, 0, next_word);
105-
// } else if ((addr & 0xffff0000) == 0xffff0000) {
106-
// // WRITE, ignore
107-
// } else {
108-
// // New address
109-
// continue;
110-
// }
111-
// last_addr += 2;
112-
113-
// // 16 LSB
114-
// next_word = CONFIG_ROM_HEADER_OVERRIDE & 0xFFFF;
115-
// addr = n64_pi_get_value(pio);
116-
// if (addr == 0) {
117-
// // READ
118-
// pio_sm_put(pio, 0, next_word);
119-
// } else if ((addr & 0xffff0000) == 0xffff0000) {
120-
// // WRITE, ignore
121-
// } else {
122-
// // New address
123-
// continue;
124-
// }
125-
// last_addr += 2;
126-
// }
127-
// #endif
95+
#if CONFIG_ROM_HEADER_OVERRIDE != 0
96+
if (last_addr == 0x10000000) {
97+
// Special case to patch PI access speed paramenters
98+
99+
// 16 MSB
100+
next_word = CONFIG_ROM_HEADER_OVERRIDE >> 16;
101+
addr = n64_pi_get_value(pio);
102+
if (addr == 0) {
103+
// READ
104+
pio_sm_put(pio, 0, next_word);
105+
} else if ((addr & 0xffff0000) == 0xffff0000) {
106+
// WRITE, ignore
107+
} else {
108+
// New address
109+
continue;
110+
}
111+
last_addr += 2;
112+
113+
// 16 LSB
114+
next_word = CONFIG_ROM_HEADER_OVERRIDE & 0xFFFF;
115+
addr = n64_pi_get_value(pio);
116+
if (addr == 0) {
117+
// READ
118+
pio_sm_put(pio, 0, next_word);
119+
} else if ((addr & 0xffff0000) == 0xffff0000) {
120+
// WRITE, ignore
121+
} else {
122+
// New address
123+
continue;
124+
}
125+
last_addr += 2;
126+
}
127+
#endif
128128

129129
do {
130130
// Pre-fetch from the address

sw/picocart64_v1/picocart64_v1.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,7 @@ int main(void)
161161
// but since it's used with a 2x clock divider,
162162
// 266 MHz is safe in this regard.
163163

164-
// set_sys_clock_khz(CONFIG_CPU_FREQ_MHZ * 1000, true);
165-
set_sys_clock_khz(266000, true);
164+
set_sys_clock_khz(CONFIG_CPU_FREQ_MHZ * 1000, true);
166165

167166
// Init GPIOs before starting the second core and FreeRTOS
168167
for (int i = 0; i <= 27; i++) {

0 commit comments

Comments
 (0)