Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) 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: 3132
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.
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
psych
Alakran_64
MaD ][/Starship
Holy Moses/Role
iAN CooG/HVSC
Guests online: 86
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 Wonderland XIV  (9.6)
9 The Ghost  (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 Wafer Demo  (9.5)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Onscreen 5k  (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 Graphicians
1 Sulevi  (10)
2 Mirage  (9.8)
3 Lobo  (9.7)
4 Mikael  (9.7)
5 Archmage  (9.7)

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