Dreamcast Fenix Technical Information 
This info was compiled from information provided by pauljake, chui, nazca, Brian Deuel, and others
last updated May 12, 2009
-
Video related:
-A simple game (with 2 processes) in m640x480 with scrolling gets 22 FPS (I think that this is because of the software render that SDL DC uses, anyways this doesn't go faster on a Pentium 3 PC of 500+ mhz).
-A simple game without scrolling in m640x480 gets around 62 FPS.
-A simple game in m320x240 with scrolling gets 63 FPS.
-Mode7 has similar framerates as scrolling does, although this drops as you add running processes. I've managed 30-35 fps with many processes running, and have to continue to optimize my code to keep it at this framerate. If you wish to use mode7, 320x240 resolution is your only choice, as 640x480 runs way too slow, even if you don't advance () your playfield.
-More mode7 limitations: on the Dreamcast, calling mode7 more than once will slow your framerate down each time. This limits you to one playfield, unfortunately.
-The visible boundaries for a 640 x 480 display on the Dreamcast on CRT televisions are as follows (x,y):
Upper left: 40,40
Upper right: 590,40
Lower left: 40,430
Lower right: 590,430
-Boundaries for a 320x240 display on CRT televisions are roughly half of the ones listed above.
-Mode7 only works in 8-bit mode. This is a global Fenix .084 limitation, not just DC Fenix.
-
Sound related(songs only):
-MOD and WAV songs files ran slow, and WAV files played very choppy.
-OGG and MID are unsupported.
-You can load around 3000kb (near 2.92mb) of song files
-If you try to load more audio data than the limit, it won't reproduce audio anymore.
-You can't use song functions to play WAV's because they will play slow and choppy. The best song format is the S3M, it plays perfect without any slowdown. The problem is there is an awful memory limitation to load WAV's with wav functions, and the limit is near or under the 500kb per file, so be careful with that. Note: Nazca states that he used the IT (tracker) music format with great success for his games (nazcadreams, etc). I have used IT format files, but notice choppiness as more and more processes run in my program. S3M is definitely the best format to convert to without slowdown or choppiness at all present.
-Converting WAVs to s3m format without a highly noticable loss of quality: You will need to use Modplug Tracker. Load the program and select "File->Open" and then search for your wave file. Once you've loaded your song file, click on "Song Properties" and select the "S3M" module type, click "ok" and again to the warning. Save your work as "nameyouwant.s3m" and then use that song (with load_song() and play_song() commands in Fenix) within your game. You will notice that you'll have bigger ram support for music (near 3 mb of file limit) and they will play without any choppiness. You can also convert IT, MOD, and XM formats in this way, although your mileage will vary depending on the samples used in the original format.
-CD Audio commands don't seem to work on the Dreamcast. Attempts were made to burn CDs, using CDRECORD, with the audio tracks in the first section of the self-bootable CD, but the DC only sees the audio and not the program portion of the CD. You can boot the code with DC Hakker, but the audio will not play.
-Loading a song, then unloading and attempting to load another song, crashes the Dreamcast at this point. Do not use unload_song() and stick with the memory limits, and you'll be fine.
-
Movie related:
-FLC files freezes the DC.
-DLLs made for the Windows port of Fenix will not load on the Dreamcast.
-
Joystick related:
-The key mappings for the digital pad (1st controller, one player only) are:
Start = Enter
A = Control
B = Alt
X = ESC (this will reboot the Dreamcast if used with exit)
Y = Spacebar
So in your program, use "_control", "_enter", "_esc", and "_space" for the keys that they're mapped to. The digital pad on the DC corresponds to the arrow keys on the keyboard.
-Mouse commands work with the analog joystick, but the movement is too jerky to be of any use. The analog part of the joystick of the DC can be called better than the mouse if you use: get_joy_position(0) for X axis and get_joy_position(1) for Y axis. The maximum amplitude that DC joystick have is 128. This value of get_joy_position(0) is negative if you put the analog at the left and positive at right. And the value of get_joy_position(1) is positive when the analog control is being pressed downwards and negative if is being pressed upwards.
-Scancode and key(_...) only works for joystick 1.
-With select_joy(0) you will use only the first controller and with select_joy(2) you will use only the second controller (so 2º controller is supported). BUT, be careful don't use scancode or key(_...) to call joysticks when you use select_joy(2) because joystick 1 and joystick 2 calls the same scancode, so you have to use ONLY joystick functions when trying to make a 2 player game.
-the joystick of the DC is supported via joystick functions, but L and R buttons are unsupported, and the D-Pad is unsupported if BOTH sticks are used (the d-pad works fine with one player games if the joystick is used too). Remember that joystick functions will be very useful if you try to make a 2 player game.
Here is the complete map:
- get_joy_position(0)= returns the state of the X axis of the analog pad (from -128 to 128 ).
- get_joy_position(1)= returns the state of the Y axis of the analog pad (from -128 to 128 ).
- get_joy_button(1)= returns the state of the B button (0 if unpressed and 1 if it's pressed).
- get_joy_button(2)= returns the state of the A button (0 if unpressed and 1 if it's pressed).
- get_joy_button(3)= returns the state of the START button (0 if unpressed and 1 if it's pressed).
- get_joy_button(5)= returns the state of the Y button.
- get_joy_button(6)= returns the state of the X button.
-
System related:
-Date and time that you get from time() and ftime() functions returns the current date and time of your DC.
-Fenix is VGAbox compatible.
-Memory limitations:
song files: approximately 3mb of s3m format data
sound samples: approximately 500 kb
FPG graphics files: approximately 5 mb
FNT font files: approximately 1 mb
-VMU saving: not possible with Fenix version 0.84b. Chui released a version of .84b that saves data to the VMU, but it is very buggy. You can download it at his website.
-
Debugging and troubleshooting:
-If your game doesn't load it's almost always due to memory problems. Keep your resources within the above limits and your game should load fine. It's best to stick to one font and FNT file, and you should have no problems with regards to fonts. I've never had luck with loading more than one FPG, so I'm assuming that one is the limit here. Another strange thing for Fenix DC is that the "unload" command brings some headaches... it's not easy to unload things with Fenix DC runtime so is better to avoid it (make small games or try to make clean code to test where to unload things right - and be prepared to waste a lot of CDs or make multisession CDs. (Just scroll down to fackue's post).