MEGA65 / mega65-rom-public

MEGA65 ROM public issue reporting
4 stars 0 forks source link

BLOAD still not fully fixed after 920400 #139

Closed dansanderson closed 3 months ago

dansanderson commented 3 months ago

From TOS22:

I am using BLOAD in TCC more or less always in the following way:

BLOAD(N$),P(AT)

where N$ is a filename and AT holds an address >$FFFF (which should trigger flat mode)

With ROM920395: no problem With ROM920399: fails to load With ROM920400: fails to load

It does not load, but it also does not throw an error (TRAP is not triggered) as it would happen with a wrong filename.

I also tried to load it direct with DLOAD"TEMPUS",P($8000000) and Return, the message was "LOADED FROM $080000 to $08D570" which would be in a bank "8" but not attic. I checked the memory with MONITOR and could not locate/find the contents of the file ...

dansanderson commented 3 months ago

I am unable to reproduce a failure of BLOAD (N$),P(A)​ with A > $FFFF in ROM 920400. My test program creates a test data file of increasing integers, sets memory to all zeroes, loads the file back in using N$="TESTDAT" and A=$41600, then confirms that memory has been updated with the contents of the file. I tried various combinations of addresses and arguments (28-bit P, 16-bit P with B, values in variables vs. literals) and haven't discovered a failing case.

I am able to reproduce BLOAD "TESTDAT",P($8000000) both writing the incorrect addresses in the LOADED message and not writing to the correct addresses in Attic RAM. I'll keep working on that, along with some other clean-up of related code.

dansanderson commented 3 months ago

I have a fix for BLOADing to Attic RAM. Getting the LOADED message to report the correct address would take a bit more work, but the actual loading was just a bug that I introduced in the SETBNK change that was easy to fix.