Starting with some unknown ROM version prior to 920398, the KERNAL SETBNK call had been disabled. DOS operations ignored the internal ba variable in favor of direct manipulation of a 28-bit address in eal-eal+3, to support 28-bit load/save addresses. In 920398, we repaired SETBNK to both honor the original 12-bit API and support a 28-bit API via an extension: if bit 7 of the bank register is set, then treat its lower bits as the megabyte and another register as the bank.
I didn't notice that calls to SETBNK from within BASIC were left intact after SETBNK was disabled. We need to audit these call sites and make sure they work with the new SETBNK definition. Ideally, we would rewrite these call sites to use the new 28-bit SETBNK API, as appropriate, and not manipulate eal directly.
At least one case of BLOAD "FILE",P(xxx),B(bbb) was noticed to be faulty. See the "C65 Notepad" demo, line 42, which does all memory operations via BASIC commands.
From a quick code review, it looks like only BLOAD and BSAVE are affected. b65.src references to _setbank:
Accept user parameter for data bank and also manipulate eal, probably needs attention:
[x] bsave
[x] bload_boot
Reset both banks to 0, probably no changes needed:
[ ] GetSaveChannel
[ ] directory
[ ] open_file
[ ] dsave
[ ] dload_boot
[ ] merge
[ ] trans
[ ] SendDiskCmd
Reset data bank to 0, name bank to 1, probably no changes needed:
Starting with some unknown ROM version prior to 920398, the KERNAL SETBNK call had been disabled. DOS operations ignored the internal
ba
variable in favor of direct manipulation of a 28-bit address ineal
-eal+3
, to support 28-bit load/save addresses. In 920398, we repaired SETBNK to both honor the original 12-bit API and support a 28-bit API via an extension: if bit 7 of the bank register is set, then treat its lower bits as the megabyte and another register as the bank.I didn't notice that calls to SETBNK from within BASIC were left intact after SETBNK was disabled. We need to audit these call sites and make sure they work with the new SETBNK definition. Ideally, we would rewrite these call sites to use the new 28-bit SETBNK API, as appropriate, and not manipulate
eal
directly.At least one case of
BLOAD "FILE",P(xxx),B(bbb)
was noticed to be faulty. See the "C65 Notepad" demo, line 42, which does all memory operations via BASIC commands.From a quick code review, it looks like only
BLOAD
andBSAVE
are affected. b65.src references to_setbank
:eal
, probably needs attention:bsave
bload_boot
GetSaveChannel
directory
open_file
dsave
dload_boot
merge
trans
SendDiskCmd
plsv
paoc