Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in 
CSDb User Forums


Forums > C64 Coding > EF 3 hardware crash
2021-07-05 11:10
oziphantom

Registered: Oct 2014
Posts: 434
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....
 
2021-07-05 17:00
tlr

Registered: Sep 2003
Posts: 1461
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.
2021-07-05 17:28
Groepaz

Registered: Dec 2001
Posts: 9970
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 :)
2021-07-05 17:30
sailor

Registered: Jan 2002
Posts: 88
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
2021-07-05 17:43
tlr

Registered: Sep 2003
Posts: 1461
Quoting sailor
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

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.
2021-07-07 08:23
oziphantom

Registered: Oct 2014
Posts: 434
anybody else been able to run the test?
2021-07-07 09:59
JackAsser

Registered: Jun 2002
Posts: 1835
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.
2021-07-07 11:12
Groepaz

Registered: Dec 2001
Posts: 9970
Works for me (EF3, assy 250469)
2021-07-08 11:38
sailor

Registered: Jan 2002
Posts: 88
Works here with EF1 and EF3 on both C64 and C128.
2021-07-10 10:42
oziphantom

Registered: Oct 2014
Posts: 434
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.
2021-07-10 12:10
Groepaz

Registered: Dec 2001
Posts: 9970
doh :=)
Previous - 1 | 2 | 3 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
acrouzet/G★P
tNG/FairLight
Mythus/Delysid
YTM/Elysium
Mr. Mouse/XeNTaX
Medicus
Remdy/Dentifrice
Guests online: 45
Top Demos
1 Coma Light 13  (9.6)
2 Edge of Disgrace  (9.6)
3 Uncensored  (9.6)
4 Bromance  (9.6)
5 Comaland 100%  (9.6)
6 Memento Mori  (9.6)
7 Lunatico  (9.6)
8 Unboxed  (9.5)
9 Christmas Megademo  (9.5)
10 Wonderland XII  (9.5)
Top onefile Demos
1 Copper Booze  (9.8)
2 Bacchus @ Night  (9.6)
3 Barry Boomer - Trapp..  (9.6)
4 Hackmap  (9.6)
5 Daah, Those Acid Pil..  (9.5)
6 To Norah  (9.5)
7 Dawnfall V1.1  (9.5)
8 Lovecats  (9.5)
9 Elite Code Mechanics  (9.4)
10 Quadrants  (9.4)
Top Groups
1 Booze Design  (9.4)
2 Oxyron  (9.4)
3 PriorArt  (9.3)
4 Crest  (9.3)
5 Triad  (9.3)
Top NTSC-Fixers
1 Pudwerx  (10)
2 Horizon  (9.9)
3 Stormbringer  (9.7)
4 Fungus  (9.5)
5 Grim Reaper  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2021
Page generated in: 0.049 sec.