Dreamcast Fenix Technical Information
This info was compiled from information provided by pauljake, chui, nazca, Brian Deuel, and others
last updated March 30, 2016
-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.
-Mode7 only works in 8-bit mode. This is a global Fenix .084 limitation, not just DC Fenix.
-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.
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(), just load all of your songs at once and leave them resident without unloading them, and stick with the memory limits, and you'll be fine.
-FLC files freezes the DC.
-DLLs made for the Windows port of Fenix will not load on the Dreamcast.
-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.
-Date and time that you get from time() and ftime() functions returns the current date and time of your DC.
-Fenix can run with a VGAbox, as long as the VGAbox flag is set in the IP.BIN. The one included on the CD Tree found on the setup page is already set.
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: Possible using 'save("/vmu/a1/myfilename.dat",variable)'. Load() works the same way. You MUST use the path '/vmu/a1/' before your filename. The file can have any extension. You can use 'a2' to save to the second player's VMU if you wish. The best place that I've found to load your VMU file is just after you load your fnt and fpg files.
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. A 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. You can also use an emulator such as nullDC to load your CD images into and test.