You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
MAP configs where we try to access Attic RAM with an offset which is below 800.0000 do not work. Tested this for MAPHI and MAPLO with different configs.
To Reproduce
Steps to reproduce the behavior:
Execute the example code on page 14-39 "Using MAP to Access Upper Memory"
Offset = $7FF.6000
High byte = $7F
Standard special value = $0F
Bank = $F
MSB of 16-bit = $60
Nibble value for segment selection MAPHI = $2
What you get is the following: the bytes itself are random and dependent on your system state; more interesting is what memory areas are different and which ones are mapping:
When you now edit the sample code, so that the Offset becomes $800.0000 or higher, means that the Attic memory you want to map is starting at 800.A000 or higher, the whole thing starts to work as expected.
Offset = $800.6000 (to reach 801.0000)
High byte = $80
Standard special value = $0F
Bank = $1
MSB of 16-bit = $00
Nibble value for segment selection MAPHI = $2
Modified example code:
LDA #$00 ; No mapping in MAPLO
LDX #$00
LDY #$80 ; High byte of Attic offset
LDZ #$0F ; Special value
MAP ; first MAP
; A+X still 0
LDY #$00 ; MSB of 16-bit
LDZ #$21 ; segment selection + offset bank
MAP ; second MAP
EOM
Expected result is matching:
MAPH: 2100
MAPL: 0000
MAPH high byte: 80
MAPL high byte: 00
<dbg>mdump 8010000
:8010000 CE A2 2B AF FA B7 3A AB 20 AE A7 88 B2 AC 2F CA | +???:? ??.??/?
<dbg>mdump 777a000
:777A000 CE A2 2B 2F FA B7 3A AB 20 AE A7 08 B2 AC 2F CA | +/??:? ??.??/?
<dbg>mapping
(...)
MAPL
----
MAPH
-----
- $A000 <-- $1,A000
(...)
Expected behavior
In the first case $777A000 should map $8000000
Alternatively we could document this behavior as a rule (maybe, until a fix is available)
Additional comment
I have tested a lot more value mixes for MAPLO and MAPHI, so the report is not only based on the above one shot
A hypothesis can be that the offset must have at least the same high byte as the memory which it is targeting
I could try these tests next: address higher Attic to see if an offset high byte over $80 makes trouble too. This is something not covered yet.
I would love to go on with debugging this, but I need somebody giving me starting points to look at. Where is mapping finally done? Is this ROM or FPGA programming or sth else? For sure I will help with testing.
The text was updated successfully, but these errors were encountered:
MAP is entirely in the CPU, not the ROM. I'll move this discussion to: MEGA65/mega65-core#838
With a short program entered via the MONITOR I'm not able to get any upper-byte offset working. It's possible my test is at fault. For now I'll assume this is a reproduction of the issue and we need more troubleshooting.
I tested the Memory chapter pretty thoroughly including this example, so I'll try to recreate the actual test I used (probably a test program via cross-development) to eliminate confusion. Once we're confident in the test steps, we might want to pursue this as a regression between v0.95 and v0.96.
Test Environment (required)
Describe the bug
MAP configs where we try to access Attic RAM with an offset which is below 800.0000 do not work. Tested this for MAPHI and MAPLO with different configs.
To Reproduce
Steps to reproduce the behavior:
Execute the example code on page 14-39 "Using MAP to Access Upper Memory"
What you get is the following: the bytes itself are random and dependent on your system state; more interesting is what memory areas are different and which ones are mapping:
When you now edit the sample code, so that the Offset becomes $800.0000 or higher, means that the Attic memory you want to map is starting at 800.A000 or higher, the whole thing starts to work as expected.
Modified example code:
Expected result is matching:
Expected behavior
Additional comment
The text was updated successfully, but these errors were encountered: