Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in 
CSDb User Forums


Forums > C64 Coding > Goattracker. Patch PAL freq tables to NTSC
2020-06-08 21:38
JackAsser

Registered: Jun 2002
Posts: 1680
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: 91
/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: 374
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
Groepaz

Registered: Dec 2001
Posts: 9318
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: 374
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: 1680
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
Groepaz

Registered: Dec 2001
Posts: 9318
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: 1475
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: 1680
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: 1475
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: 1680
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
Durandal
OEP
wbochar
Guests online: 47
Top Demos
1 Coma Light 13  (9.7)
2 Uncensored  (9.7)
3 Edge of Disgrace  (9.7)
4 Comaland 100%  (9.6)
5 Unboxed  (9.6)
6 The Shores of Reflec..  (9.6)
7 Lunatico  (9.5)
8 Remains  (9.5)
9 NGC 1277 100%  (9.5)
10 Wonderland XII  (9.4)
Top onefile Demos
1 Dawnfall V1.1  (9.6)
2 Listen to Your Eyes  (9.6)
3 MD202006 - Get Well ..  (9.6)
4 The Tuneful Eight [u..  (9.5)
5 Smile to the Sky  (9.5)
6 Crystal Gazer  (9.5)
7 Instinct  (9.5)
8 Coro(l)na Nuthouse  (9.5)
9 Rewind  (9.5)
10 Bad Boy  (9.5)
Top Groups
1 PriorArt  (9.6)
2 Performers  (9.5)
3 Booze Design  (9.4)
4 Fossil  (9.4)
5 Censor Design  (9.4)
Top Crackers
1 Mr. Z  (10)
2 S!R  (9.9)
3 Mr Zero Page  (9.8)
4 Excell  (9.8)
5 Mitch  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2020
Page generated in: 0.053 sec.