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: 2014
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: 2014
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: 11387
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: 2014
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: 2014
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: 2014
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: 2981
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: 11387
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: 2981
Yeah, use the auto-increment feature to write-read some magic words. =)
2021-09-28 23:27
Oswald

Registered: Apr 2002
Posts: 5095
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: 11387
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
kbs/Pht/Lxt
CA$H/TRiAD
The Syndrom/TIA/Pret..
Knut Clausen/SHAPE/F..
Scrap/Genesis Project
MCM/ONSLAUGHT
SplAtterpunk
Acidchild/Padua
Scrapper
Guests online: 120
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.6)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Sprite Bukkake 2  (9.6)
9 Uncensored  (9.6)
10 Comaland 100%  (9.6)
Top onefile Demos
1 Layers  (9.7)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 Morph  (9.5)
7 Dawnfall V1.1  (9.5)
8 Libertongo  (9.5)
9 Katzen-Video.mp4  (9.5)
10 Onscreen 5k  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Performers  (9.3)
4 Fairlight  (9.3)
5 Triad  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Mutetus  (9.7)
3 Jeroen Tel  (9.7)
4 Linus  (9.6)
5 Jammer  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.078 sec.