Logging the NES APU writes in Famitracker - FamiTracker

# FamiTracker

FamiTracker Support Forums

Skip to content

## Logging the NES APU writes in Famitracker

General discussion about tracking, help and support.
Post Reply

- Print view

6 posts • Page 1 of 1

DRW
  Posts: 67
  Joined: Mon Oct 19, 2015 8:24 pm

### Logging the NES APU writes in Famitracker

- Quote

Post by DRW » Sat Oct 24, 2015 8:15 pm

If I open an ".ftm" file in Famitracker, is there a way to convert this file into the values that would have to be written into the APU of the NES?
So, for example a file that looks like this:

Code: Select all

`Frame 1:
Port $4000: Value 10110101
Port $4001: <Not written>
Port $4002: Value 10101101
...
Frame 2:
Port $4000: ...`
Top

HertzDevil
  Posts: 475
  Joined: Thu Apr 23, 2015 7:39 pm
  Location: Hong Kong SAR
  Contact:
  Contact HertzDevil
  Website Facebook Twitter Skype
  YouTube

### Re: Logging the NES APU writes in Famitracker

- Quote

Post by HertzDevil » Sat Oct 24, 2015 8:33 pm

Uncomment the line "//define LOGGING" in APU.H then recompile FamiTracker. In that case, FamiTracker generates a file called "apu_log.txt" where register information is dumped while playing any track.
This is at most a snapshot of the internal APU registers at every tick. It is not safe to assume that values are written to APU ports only when the values change.
FamiTracker may log VGM files in an analogous way, which are indeed register streams.
refactoring 0cc-famitracker
Top

DRW
  Posts: 67
  Joined: Mon Oct 19, 2015 8:24 pm

### Re: Logging the NES APU writes in Famitracker

- Quote

Post by DRW » Sat Oct 24, 2015 8:39 pm

Yes, the snapshot situation is fine for me.
But seriously? I have to fiddle with the source code and recompile it? Isn't there an option inside the actual program to output any file as an APU register value list?
Or at least any other text format?
I need to be able to see at least all the notes of a Famitracker song and their frame durations in a format that is readable by a human, so that I can put these values into my NES game (which uses its own functions to process the data).
Top

HertzDevil
  Posts: 475
  Joined: Thu Apr 23, 2015 7:39 pm
  Location: Hong Kong SAR
  Contact:
  Contact HertzDevil
  Website Facebook Twitter Skype
  YouTube

### Re: Logging the NES APU writes in Famitracker

- Quote

Post by HertzDevil » Sat Oct 24, 2015 9:07 pm

Be grateful that FamiTracker is not closed-source.

Attachments
  apu_log.rar
    Line 538, APU.c changed from "str.Append("\n");" to "str.Append("\r\n");"
    (300.39 KiB) Downloaded 139 times

refactoring 0cc-famitracker
Top

DRW
  Posts: 67
  Joined: Mon Oct 19, 2015 8:24 pm

### Re: Logging the NES APU writes in Famitracker

- Quote

Post by DRW » Sat Oct 24, 2015 9:24 pm

Thanks. But seriously: Why is this not at least a command line option?
About the file contents: Can I be sure that the first value is for port $4000, the second for $4001 etc.?
Top

Stratelier
  Posts: 378
  Joined: Sun Apr 26, 2015 7:46 pm

### Re: Logging the NES APU writes in Famitracker

- Quote

Post by Stratelier » Sun Oct 25, 2015 5:43 am

It may help to toggle the 2A03 register display (under the Tracker menu) when playing your FTM.
Top

Display posts from previous:
Sort by

Post Reply

- Print view

6 posts • Page 1 of 1

Return to “General Talk”

Jump to

- Rules
- Wiki
- FamiTracker
- General Talk
- Bug Reports
- Feature Requests
- Source and development
- Music
- Original Music
- Cover Music
- Other
- Site Issues & Suggestions