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 > Goattracker. Patch PAL freq tables to NTSC
2020-06-08 21:38
JackAsser

Registered: Jun 2002
Posts: 1987
Goattracker. Patch PAL freq tables to NTSC

Hi!

Where are the frequency tables located in GT-tune? Static? Dynamic? What to search for?

And what should I write there for NTSC-tuning?
 
... 3 posts hidden. Click here to view all posts....
 
2020-06-08 22:14
McMeatLoaf

Registered: Jan 2005
Posts: 105
/G"pitch" as a command. By default this applies to PAL. With A4 = 440.0 Hz this command is /G440.0
To convert to NTSC you have compensate the different clock speeds:

440 Hz*985248/1022727 ~= 423.88 Hz

Therefore /G423.88

I guess they (the pitch tables) are generated from scratch at startup.

Have I answered any of your questions? :)
2020-06-08 22:31
Mr. SID

Registered: Jan 2003
Posts: 421
It's dynamic, it sucks.
Search for the second occurence of 9D 00 D4
The three bytes before that are e.g. B9 XX YY
Take YYXX and add $0080, that's the base of the freq lo-byte table.
Add $0060 to get to the freq hi-byte table (that one should start with 01 01 01 01).

Patch it for NTSC to this:
FreqLo:
$0c,$1c,$2d,$3f,$52,$66,$7b,$92,$aa,$c3,$de,$fa,$18,$38,$5a,$7e
$a4,$cc,$f7,$24,$54,$86,$bc,$f5,$31,$71,$b5,$fc,$48,$98,$ee,$48
$a9,$0d,$79,$ea,$62,$e2,$6a,$f8,$90,$30,$dc,$90,$52,$1a,$f2,$d4 
$c4,$c4,$d4,$f0,$20,$60,$b8,$20,$a4,$34,$e4,$a8,$88,$88,$a8,$e0
$40,$c0,$70,$40,$48,$68,$c8,$50,$10,$10,$50,$c0,$80,$80,$e0,$80
$90,$d0,$90,$a0,$20,$20,$a0,$80,$00,$00,$c0,$00,$20,$a0,$20,$40 

FreqHi:
$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$02,$02,$02,$02
$02,$02,$02,$03,$03,$03,$03,$03,$04,$04,$04,$04,$05,$05,$05,$06
$06,$07,$07,$07,$08,$08,$09,$09,$0a,$0b,$0b,$0c,$0d,$0e,$0e,$0f
$10,$11,$12,$13,$15,$16,$17,$19,$1a,$1c,$1d,$1f,$21,$23,$25,$27
$2a,$2c,$2f,$32,$35,$38,$3b,$3f,$43,$47,$4b,$4f,$54,$59,$5e,$64
$6a,$70,$77,$7e,$86,$8e,$96,$9f,$a9,$b3,$bd,$c9,$d5,$e1,$ef,$fd 

2020-06-08 22:31
chatGPZ

Registered: Dec 2001
Posts: 11100
I think he looking for the note to freq lookup table inside the tune so he can patch it on the fly.... you should be able find it easily by producing two tunes with the /G command and then diff them.

BUT - take care, various commands work linearly on the frequency (glides in particular), so just changing the note table will perhaps not give you a good result.
2020-06-08 22:37
Mr. SID

Registered: Jan 2003
Posts: 421
Yes, obviously re-exporting for NTSC is the better choice, but I assume that's not an option...
2020-06-09 07:19
JackAsser

Registered: Jun 2002
Posts: 1987
Huge thanks guys. Reexporting might be an option tbh but dynamically change the tune might be an alternative so save a few precious bytes. The EotB cart is crowded...

Otoh reexporting it and place it after the PAL version and compress them together will probably pack extremely effective.

We’ll see..
2020-06-09 12:54
chatGPZ

Registered: Dec 2001
Posts: 11100
you could export both, and then just pack the delta for the ntsc one... that should be very efficient if the only difference are the freq table and perhaps a couple speedbytes in instruments/slides.
2020-06-09 13:06
Krill

Registered: Apr 2002
Posts: 2825
Hmm, seems like a dictionary-based packer specialised for cartridge usage hasn't been invented yet? =)
2020-06-09 13:16
JackAsser

Registered: Jun 2002
Posts: 1987
Quote: Hmm, seems like a dictionary-based packer specialised for cartridge usage hasn't been invented yet? =)

Hehe, I use ByteBoozer2. No need to delta it first since the dictionary will hit it anyway.
2020-06-09 14:05
Krill

Registered: Apr 2002
Posts: 2825
Does ByteBoozer2 have a mode for an external dictionary? As in referencing that instead of/in addition to backrefs into already depacked code? If so, sorry, didn't know. :)
2020-06-09 15:27
JackAsser

Registered: Jun 2002
Posts: 1987
Quote: Does ByteBoozer2 have a mode for an external dictionary? As in referencing that instead of/in addition to backrefs into already depacked code? If so, sorry, didn't know. :)

Nono the dictionary is on the fly, i.e backrefs only
Previous - 1 | 2 - 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
Linus/MSL
Flex/Artline Designs
Sentinel/Excess/TREX
El Jefe/sidDivers
DjS/Silicon Ltd
eryngi
CA$H/TRiAD
Operator Teleksu
Guests online: 110
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.9)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (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 Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 MWS  (9.6)

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