You are not logged in -
nap
CSDb User Forums
Forums
>
C64 Coding
>
SID file: ZP usage and model detection
2018-01-15
19:43
Zirias
Registered: Jan 2014
Posts: 48
SID file: ZP usage and model detection
Hi all,
I just had the idea to build a SID file directly from my game's source. This seemed to work fine in a win32 sid player I tried, still I have two questions:
- my play routine uses *a lot* of zeropage (all internal state plus a set of shadow registers), just because I had enough available in my game. Could this be a problem with some players? Are there some guidelines about zp usage?
- the init routine contains a model detection using the method from here:
http://codebase64.org/doku.php?id=base:detecting_sid_type_-_saf..
-- can I safely keep this in a sid file or should I remove it?
2018-01-16
10:16
iAN CooG
Registered: May 2002
Posts: 3193
zp can be safely used as you want, $02-$ff. Don't assume it's zeroed, always init the locations.
The detection could fail in older players, as you check VIC regs and rely on correct SID emulation, so don't count on it working everywhere.
I sometime onefile sids released as 2 sids, 6581 and 8580 versions of the same tune, but appear just altered in few bytes to adjust instruments, I add a routine to patch those bytes depending on the selected subtune, tune 0 for 6581 and tune 1 for 8580, so one can just change the sidmodel in his sidplayer and choose which to play, also leaving him the freedom to listen to each with the WRONG sidmodel if he wants. =)
2018-01-16
12:21
Zirias
Registered: Jan 2014
Posts: 48
Thanks, that's a nice idea! My code only self-mods a pointer to the filter table depending on the SID model, so I could easily adapt this to use the tune number instead.
Refresh
Subscribe to this thread:
You need to be logged in to post in the forum.
Search the forum:
Search
All forums
C64 Coding
C64 Composing
C64 Pixeling
C64 Productions
CSDb Bug Reports
CSDb Development
CSDb Discussions
CSDb Entries
CSDb Feedback
CSDb Info
CSDb moderators
CSDb Questions
Messages to moderators
Requests
for
in
Writer & text
Text
Writer
All times are CET.
Search CSDb
All
Releases
Groups
Sceners
Events
BBS
SIDs
-------
Forum
Comments
Advanced
Users Online
Flashback
psych
algorithm
morphfrog
stephan-a
Guests online: 94
Top Demos
1
Next Level
(9.7)
2
13:37
(9.7)
3
Mojo
(9.7)
4
Coma Light 13
(9.6)
5
Edge of Disgrace
(9.6)
6
What Is The Matrix 2
(9.6)
7
The Demo Coder
(9.6)
8
Uncensored
(9.6)
9
Comaland 100%
(9.6)
10
Wonderland XIV
(9.6)
Top onefile Demos
1
Layers
(9.6)
2
No Listen
(9.6)
3
Cubic Dream
(9.6)
4
Party Elk 2
(9.6)
5
Copper Booze
(9.6)
6
Rainbow Connection
(9.5)
7
Dawnfall V1.1
(9.5)
8
Onscreen 5k
(9.5)
9
Morph
(9.5)
10
Libertongo
(9.5)
Top Groups
1
Performers
(9.3)
2
Booze Design
(9.3)
3
Oxyron
(9.3)
4
Triad
(9.3)
5
Censor Design
(9.3)
Top Organizers
1
Burglar
(9.9)
2
Sixx
(9.8)
3
hedning
(9.7)
4
Irata
(9.7)
5
Tim
(9.7)
Home
-
Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.031 sec.