Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Vaz ! (Registered 2018-02-19) You are not logged in 
CSDb User Forums


Forums > C64 Coding > SID file: ZP usage and model detection
2018-01-15 20:43
Zirias

Registered: Jan 2014
Posts: 11
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 11:16
iAN CooG

Registered: May 2002
Posts: 1773
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 13:21
Zirias

Registered: Jan 2014
Posts: 11
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
Alakran_64
Guests online: 33
Top Demos
1 Uncensored  (9.7)
2 Edge of Disgrace  (9.7)
3 Coma Light 13  (9.6)
4 The Shores of Reflec..  (9.6)
5 Comaland 100%  (9.6)
6 Lunatico  (9.6)
7 Incoherent Nightmare  (9.5)
8 Wonderland XII  (9.5)
9 Comaland  (9.5)
10 Wonderland XIII  (9.5)
Top onefile Demos
1 Pandemoniac Part 2 o..  (9.5)
2 Synthesis  (9.5)
3 Daah, Those Acid Pil..  (9.5)
4 Dawnfall V1.1  (9.5)
5 Treu Love [reu]  (9.5)
6 FMX Music Demo  (9.4)
7 Dawnfall  (9.4)
8 Merry Xmas 2017  (9.4)
9 Tribute to Bob Wakelin  (9.3)
10 Hardware Accelerated..  (9.3)
Top Groups
1 Oxyron  (9.4)
2 Booze Design  (9.4)
3 Censor Design  (9.3)
4 Crest  (9.3)
5 Finnish Gold  (9.3)
Top Logo Graphicians
1 Pal  (9.5)
2 Jailbird  (9.3)
3 Yazoo  (9.3)
4 Mermaid  (9.2)
5 Elko  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2018
Page generated in: 0.229 sec.