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


Forums > C64 Coding > EF 3 hardware crash
2021-07-05 11:10
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....
 
2021-07-05 17:00
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.
2021-07-05 17:28
chatGPZ

Registered: Dec 2001
Posts: 11108
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: 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
2021-07-05 17:43
tlr

Registered: Sep 2003
Posts: 1714
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: 478
anybody else been able to run the test?
2021-07-07 09:59
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.
2021-07-07 11:12
chatGPZ

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

Registered: Jan 2002
Posts: 90
Works here with EF1 and EF3 on both C64 and C128.
2021-07-10 10:42
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.
2021-07-10 12:10
chatGPZ

Registered: Dec 2001
Posts: 11108
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
Krill/Plush
csabanw
Martin Piper
Flex/Artline Designs
alwyz/udi
Guests online: 144
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 S!R  (9.9)
3 Mr Zero Page  (9.8)
4 Antitrack  (9.8)
5 OTD  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.054 sec.