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 > Detect C128 in C64-mode without exploiting 2mhz mode?
2020-04-03 08:04
JackAsser

Registered: Jun 2002
Posts: 1987
Detect C128 in C64-mode without exploiting 2mhz mode?

Reason: Easyflash emulation in 1541u2 doesn’t work in 2mhz mode.
 
... 40 posts hidden. Click here to view all posts....
 
2020-04-03 16:01
JackAsser

Registered: Jun 2002
Posts: 1987
Quote: That’s the follow up question!

First I want to detect c128 in a safe way and offer 2mhz mode and then add a disclaimer for 1541u2 user or detect it and disable the feature
2020-04-03 16:22
chatGPZ

Registered: Dec 2001
Posts: 11088
Why not just offer it as an option (default disabled)? Autodetection is doomed to fail in one way or another :)
2020-04-03 17:08
JackAsser

Registered: Jun 2002
Posts: 1987
Quote: Why not just offer it as an option (default disabled)? Autodetection is doomed to fail in one way or another :)

It is an option already.. yeah. Maybe add a disclaimer
2021-09-27 23:16
JackAsser

Registered: Jun 2002
Posts: 1987
Currently making the automap to show on the VDC always. It would be very nice not to have to enable it explicitally. Any options? I don’t wanna mess with the VDC regs unless I’m sure it’s really there. Can you reliably detect the presence of a VDC-chip? I know several possible solutions but is also afraid of GP’s ”doomed to fail”. Is detecting a VDC chip really doomed to fail?
2021-09-27 23:35
JackAsser

Registered: Jun 2002
Posts: 1987
FWIW, currently doing:
		ldx #0
		ldy #5
		stx VDCADR
		:
			bit VDCADR
			bmi vdcFound
			inx
			bne :-
			dey
		bpl :-
		rts
vdcFound:
		inc vdcPresent
		rts
2021-09-28 11:28
Krill

Registered: Apr 2002
Posts: 2804
Since your detection routine is writing to a VDC register, i'd suggest reading a byte from VDC RAM, writing it back inverted, then reading it again.
2021-09-28 14:11
chatGPZ

Registered: Dec 2001
Posts: 11088
and i'd suggest to use a couple different bytes on subsequent addresses, so it doesnt fail randomly (or to be exact: fails much less likely randomly) because floating bus :)
2021-09-28 14:36
Krill

Registered: Apr 2002
Posts: 2804
Yeah, use the auto-increment feature to write-read some magic words. =)
2021-09-28 23:27
Oswald

Registered: Apr 2002
Posts: 5007
Quote: FWIW, currently doing:
		ldx #0
		ldy #5
		stx VDCADR
		:
			bit VDCADR
			bmi vdcFound
			inx
			bne :-
			dey
		bpl :-
		rts
vdcFound:
		inc vdcPresent
		rts


probably I'm missing something here, but if d600 is open io you may get bits set at VDCADR just randomly?
2021-09-28 23:33
chatGPZ

Registered: Dec 2001
Posts: 11088
Indeed. And for more fun, its not exactly random, but depends on what the VIC fetched in the previous cycle :)
Previous - 1 | 2 | 3 | 4 | 5 - 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
hedning/G★P
bugjam
ϵʟʞ/ₐтₐ
krissz
Sande/Hokuto Force
t0m3000/ibex-crew
Tom-Cat/Nostalgia
Mad Doc/T.U.T. 1992
TMA/Abyss-Connection
wil
Luca/FIRE
Nordischsound/Hokuto..
Guests online: 331
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 No Bounds  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 Party Elk 2  (9.7)
2 Cubic Dream  (9.6)
3 Copper Booze  (9.5)
4 Rainbow Connection  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Onscreen 5k  (9.5)
7 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Nostalgia  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Coders
1 Axis  (9.8)
2 Graham  (9.8)
3 Lft  (9.8)
4 Crossbow  (9.8)
5 HCL  (9.8)

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