Opened 10 years ago

Closed 10 years ago

Last modified 10 months ago

#9020 closed patch

GSOC: Transform scummvm into a modplayer

Reported by: SF/nolange Owned by:
Priority: normal Component: Audio
Keywords: Cc:
Game:

Description

Since Im going to implement a couple audioformats its important I can test them easily.
This patch is disabling the normal scummvm-launcher and instead simply loads a protracker module and plays it.
Included are new projectfiles for MSVC9 and adjustments to Makefile.common to include a new directory "TFMX".
I will keep any auxiliary stuff in this folder (docs describing the format, commented disassemblies,etc)

Ticket imported from: #2795660. Ticket imported from: patches/1125.

Attachments (5)

patch.diff (44.5 KB) - added by SF/nolange 10 years ago.
patch against rev 40797
patch2.diff (50.7 KB) - added by SF/nolange 10 years ago.
patch against 40857
patch3.diff (51.2 KB) - added by SF/nolange 10 years ago.
Corrected conventions and foldername
TFMXPatch1.diff (93.1 KB) - added by SF/nolange 10 years ago.
initial TFMX commit
TFMXPatch2.diff (93.4 KB) - added by SF/nolange 10 years ago.
Compiles under Linux, minor fixes

Download all attachments as: .zip

Change History (19)

Changed 10 years ago by SF/nolange

Attachment: patch.diff added

patch against rev 40797

comment:1 Changed 10 years ago by lordhoto

Parts of the patch are not correctly formatted, you should read up on our code formatting guidelines: http://wiki.scummvm.org/index.php/Code_Formatting_Conventions .

About the new directory:

The name should be all lowercase.
Also I'm myself actually unsure of the new directory, later on the standalone TFMX player should be placed in sound/. For the time of working it might be easier of course to use an alternative file with the main, as you did it. I guess your mentor(s) will have the final word here.

comment:2 Changed 10 years ago by SF/nolange

this TFMX directory wont be merged back in the main branch, it will contain stuff that I need for developing the TFMX-module. the code that ends up in scummvm will be in sound/mods - its just not there yet.

Yes I havent been correcting the code I disabled with the #if 0 directive (the rest should be fine). I wont be around on Saturday and I wanted to commit something.

comment:3 Changed 10 years ago by SF/nolange

New patch uploaded (patch2). Now parses a TFMX Module and creates a instance of a Tfmx Class based on it.
Files have to be named music.dat and sample.dat (standard names for TFMX) and placed into current working dir.

Changed 10 years ago by SF/nolange

Attachment: patch2.diff added

patch against 40857

comment:4 Changed 10 years ago by SF/knakos

Looks good so far Norbert!
Keep it up!

PS. Love the patch title :-)

comment:5 Changed 10 years ago by lordhoto

Ah ok I didn't know about your plans with the "tfmx" directory before. :-)

comment:6 Changed 10 years ago by sev-

Code formatting woes. Particularly Tfmx::load() method.

Please, fix it.

Also please, do not use caps in the directory names.

comment:7 Changed 10 years ago by SF/nolange

knakos: thanks.

Ok, Folder is lowercase now and I went over the source... twice. I hope for both our sakes that Im getting used to this convention fast =)
Please tell me if Im doing anything consistenly wrong.

Changed 10 years ago by SF/nolange

Attachment: patch3.diff added

Corrected conventions and foldername

Changed 10 years ago by SF/nolange

Attachment: TFMXPatch1.diff added

initial TFMX commit

comment:8 Changed 10 years ago by SF/nolange

Changes in Paula.cpp/Paula.h + soundfx.cpp:
Added (easy) queueing of samples by implementing methods that act similar like writes to the Amiga-Chipset would.
Added counting of DMA-Interrupts, that is how often a sample finished playing.
Added a base for the interrupt-interval, in most cases this will be the Cia-clockrate. Derived classes can then set the interval without scaling to the samplerate

Changes in common/scummsys.h:
Only disable warnings with pragmas for MS Compilers that cant do so otherwise. Newer MSVC Versions can and should disable warnings in the Project-Settings.

Files in tfmx:
Some files for debugging. Wont ever be commited back into trunk so those will contain some messy and hackish code

Added: tfmx.h/tfmx.cpp
Player for TFMX-Modules.

Rest: main.cpp etc.
Modified buildsystem to include new directory, modified main.cpp so it calls tfmxmain (tfmxplayer.cpp) instead of starting the GUI.

Unfortunatly it complains about unfound symbols under Unix, need some help fixing this as I dont have an idea whats wrong

comment:9 Changed 10 years ago by DrMcCoy

Just some quick comments:

About the linking issues: You need to specify libtfmx.a before libsound.a. I.e. in Makefile.common, tfmx should be before sound in MODULES.

Also, you forgot a "#define TFMXDEBUG_H" in tfmx/tfmxdebug.h.

Another minor thing: You might want to use spaces for alignment, like when you aligned "="s in the enum in paula.h. I've got my tabwidth set to 2, alignment-tabs break then. Generally, tabs for indenting and spaces for alignment is the way to go, IMO.

comment:10 Changed 10 years ago by DrMcCoy

And another thing: The boundaryCheck-assertion gets triggered for me. Digging into it a bit (valgrind ftw :)) showed that you forgot to initialize the _channelCtx array.

Changed 10 years ago by SF/nolange

Attachment: TFMXPatch2.diff added

Compiles under Linux, minor fixes

comment:11 Changed 10 years ago by SF/nolange

New version: fixed linking issues, TFMXDEBUG and paula.h

comment:12 Changed 10 years ago by SF/nolange

Status: newclosed

comment:13 Changed 10 years ago by SF/nolange

Closed, patch will be committed to gsoc2009-mods branch

comment:14 Changed 10 months ago by digitall

Component: Audio
Note: See TracTickets for help on using tickets.