Closed ki-bo closed 3 weeks ago
Proposal to support load addresses > 1MB in a backwards compatible way:
An alternative proposal which might be easier to use from a user perspective:
This will allow for backwards compatible setting of larger addresses, and does not need shifting of bits for the user.
; Three examples:
; Setting BANK for address $4xxxx
LDA #$04 ; set bank for load to $04
LDX #$00 ; bank for filename address
JSR $FF6B
; Setting BANK for address $800xxxx (attic ram)
LDA #$08 ; bits 27..24 of address
ORA #$80 ; mark as 28 bit address
LDY #$00 ; bits 23..16 of address
LDX #$00 ; bank of filename address
JSR $FF6B
; Setting BANK for address $FF8xxxx (colour ram)
LDA #$0F ; bits 27..24 of address
ORA #$80 ; mark as 28 bit address
LDY #$F8 ; bits 23..16 of address
LDX #$00 ; bank of filename address
JSR $FF6B
Adding the relevant details here because I want to fix this soon. I like the A > 127 proposal.
"direct page 32 bit pointer eal ($ad,$ae,$af,$b0)" https://discord.com/channels/719326990221574164/782757495180361778/1028680048204587068
... For completeness, I think the filename bank could also be made 28-bit in the same way with the Z register. The routine that accesses it would have to be rewritten to use lda [zp4],z
instead of lda_far
.
This is now implemented. The test program passes as written, and the proposed 28-bit API for both data and filename now works.
Now documented in the new jump table reference: https://github.com/MEGA65/mega65-user-guide/commit/44cebcb5f374c1ecb15f8b89cb4aa1b807d0c8b8
(ROM 920398 will be released soon.)
Test Environment (required) You can use MEGA65INFO to retrieve this.
Describe the bug When trying to load a file to a dedicated load address > $FFFF, I noticed that the documented kernel API to configure the bank of the load address is available (see C65 specification), but it just won't work. The file still got loaded as if the bank was still configured to 0.
To Reproduce Steps to reproduce the behaviour:
Try to load a file to an upper bank address, eg. like this:
filename: .text "M11"