| |
oziphantom
Registered: Oct 2014 Posts: 478 |
EF 3 hardware crash
So I have this Easy flash cart that I'm flashing to the EF3 in the normal way. Nothing special.
In VICE it works perfectly fine, no issues.
However on hardware it crashes.
The structure is a little odd.
the lo bank is mirrored across all lower banks, i.e bank 0 8000-9FFF = 1 8000-9FFF = 2 8000-9FFF etc the upper 8K is unique, kind of the reverse of a NES mapper I guess.
When the code changes the bank, there is a routine that takes A and does
and #$3f
sta $DE01
rts
on hardware this kills it, as far as I can tell a BRK occurs. It should be fine because that routine is in every lower bank in the same spot. That fact that it works in VICE tells me this is true.
But is there a case where on hardware ( I'm running it on a Commodore 128, it has also been shown to fail on a 1541U11+ with identical behavior ) the read of the RTS can fail? It gets garbage data for the next clock, the latch hasn't settled in time or something?
Or any other ideas? |
|
... 17 posts hidden. Click here to view all posts.... |
| |
tlr
Registered: Sep 2003 Posts: 1714 |
Quote: Right!
That is wrong,
this is the correct order
start
sei ; reset/init
ldx #$ff
txs
cld
lda #$e7
sta $01
lda #$2f
sta $00
This sound very strange to me. The Kernal does it the other way round for instance.
Note that if you are in Ultimax mode the banking bits do nothing so then either way is ok. I'm not familiar with the Easyflash HW so don't know if it's applicable here. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11111 |
the kernal sets $01 first, its the only correct way to do it
http://unusedino.de/ec64/technical/aay/c64/romfda3.htm
anyway, that is not the problem here :) |
| |
sailor
Registered: Jan 2002 Posts: 90 |
Sorry for confusion, trying to sort my notes, but having $00 before $01 for easyflash caused it to crash, worked in emu.
The code above is mainly from kernal boot seq,
.C:fdd5 A9 E7 LDA #$E7
.C:fdd7 85 01 STA $01
.C:fdd9 A9 2F LDA #$2F
.C:fddb 85 00 STA $00
|
| |
tlr
Registered: Sep 2003 Posts: 1714 |
Quoting sailorSorry for confusion, trying to sort my notes, but having $00 before $01 for easyflash caused it to crash, worked in emu.
The code above is mainly from kernal boot seq,
.C:fdd5 A9 E7 LDA #$E7
.C:fdd7 85 01 STA $01
.C:fdd9 A9 2F LDA #$2F
.C:fddb 85 00 STA $00
And sorry for my confusion too, I missed that you acknowledged the error when I wrote my previous comment.
Anyway, as gpz says not likely the problem oziphantom is seeing. |
| |
oziphantom
Registered: Oct 2014 Posts: 478 |
anybody else been able to run the test? |
| |
JackAsser
Registered: Jun 2002 Posts: 1989 |
Quote: anybody else been able to run the test?
I’ll try on my c128 tonight with my own ef1 clone, the ef3 and 1541u2+. What firmware on the u2+ Are u running? Chances are it’s a unique EF3 bug. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11111 |
Works for me (EF3, assy 250469) |
| |
sailor
Registered: Jan 2002 Posts: 90 |
Works here with EF1 and EF3 on both C64 and C128. |
| |
oziphantom
Registered: Oct 2014 Posts: 478 |
okay trick found.
It just so happens that you were putting it in slot 1 right?
So Millfork's code was using DE01 to change the bank, somehow I didn't twig this was wrong. After doing EF-128 and modifying things left right and centre I really should have but I didn't and just went with it, it works in VICE after all...
So if you just so happen to flash it into slot 1, my test code does
set up border
change to EF cart in slot 1, which is NOP
continues the code in the same bank
which works because it just sets it self to its self.
This also works fine in VICE as the EF1 doesn't care about DE00 vs DE01 and hence on an EF1 it will work regardless. But on an EF3 DE01 changes the Cart slot and yes it is perfectly active once you have selected a slot. Thus on EF3 hardware if you put it in a slot other than 1, I put my on 4 by chance, then it fails horribly as it will randomly jump into what I had in slot 1 and crash. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11111 |
doh :=) |
Previous - 1 | 2 | 3 - Next |