Homebrew Homebrew game [Release] 3D Pinball Space Cadet DS port

Apache Thunder

I have cameras in your head!
Member
Joined
Oct 7, 2007
Messages
4,573
Trophies
3
Age
37
Location
Levelland, Texas
Website
www.mariopc.co.nr
XP
7,245
Country
United States
Now we just need someone to port the Win98 3D Maze screensaver to DS. :D

There is source to that floating around too if you look hard enough. I think someone on Twitter talked about it. I forgot where I found it though. Should show up in a google search if you look hard enough. :P
 

mrparrot2

Well-Known Member
Member
Joined
Nov 29, 2021
Messages
120
Trophies
0
Age
29
Location
SP, Brazil
XP
666
Country
Brazil
So I just played it a little bit on my DSi using the Windows 95 files and it surprised me how well it did play. I wasn't expecting that f32 emulation working so well here. The flipped mode also improves visibility on the little DS screen :)

There are some little bugs that I already noticed:

1- Game stutters sometimes when the ball hits something. My hypothesis here is because audio is loaded in some kind of cache, and if there is a cache miss, it loads it from the SD card. I've seen this problem before, unfortunately seeking through the SD card for files can be really slow.

2- The music also stutters when looping. I think this is because of the same problem as 1.

Now I wonder if an extra table mode could be implemented by using both screens as the table on horizontal. Maybe one can setup two Backgrounds, one in VRAM bank A (top screen) and another in VRAM bank B (bottom screen) and then setup the first background so it skips the first 64k of bank A. That way when you draw the table it would draw half of the table on the first background (top screen), overflow and draw the second half of the table on the second background (bottom screen).

I also wonder if Space Cadet works on 256 colors mode? That way you can improve performance by reducing the amount of bytes to draw by half.
 
  • Like
Reactions: Headshotnoby

Headshotnoby

Active Member
OP
Newcomer
Joined
Jul 31, 2019
Messages
36
Trophies
0
Age
24
Website
github.com
XP
553
Country
Venezuela
So I just played it a little bit on my DSi using the Windows 95 files and it surprised me how well it did play. I wasn't expecting that f32 emulation working so well here. The flipped mode also improves visibility on the little DS screen :)

There are some little bugs that I already noticed:

1- Game stutters sometimes when the ball hits something. My hypothesis here is because audio is loaded in some kind of cache, and if there is a cache miss, it loads it from the SD card. I've seen this problem before, unfortunately seeking through the SD card for files can be really slow.

2- The music also stutters when looping. I think this is because of the same problem as 1.

Now I wonder if an extra table mode could be implemented by using both screens as the table on horizontal. Maybe one can setup two Backgrounds, one in VRAM bank A (top screen) and another in VRAM bank B (bottom screen) and then setup the first background so it skips the first 64k of bank A. That way when you draw the table it would draw half of the table on the first background (top screen), overflow and draw the second half of the table on the second background (bottom screen).

I also wonder if Space Cadet works on 256 colors mode? That way you can improve performance by reducing the amount of bytes to draw by half.
1. the stutter when the ball hits something occurs when the game updates the info text (or score) on the right side of the screen, or on the right screen in either of the rotated modes. all the sounds are loaded into RAM when the game loads

2. this is most likely due to the music which is an MP3 file. looping with MP3 is not perfect (not gapless?) so you hear a split-second silence before the song starts again

i don't think i can make an extra screen mode with what you described because then there's nowhere to fit the panel that shows your score, ball count, mission text etc..

either way, thanks for your feedback
 

Lee_Titt

New Member
Newbie
Joined
Feb 16, 2021
Messages
4
Trophies
0
Age
44
XP
51
Country
Austria
Hey, so I'm trying to boot this port via drastic, but wherever i put the data files i lways get a "Please check your SD card" error. Is there a way to bypass this on emulator or maybe to combine the .nds file and data files? Sorry if it sounds unrealistic
 

Headshotnoby

Active Member
OP
Newcomer
Joined
Jul 31, 2019
Messages
36
Trophies
0
Age
24
Website
github.com
XP
553
Country
Venezuela
Hey, so I'm trying to boot this port via drastic, but wherever i put the data files i lways get a "Please check your SD card" error. Is there a way to bypass this on emulator or maybe to combine the .nds file and data files? Sorry if it sounds unrealistic
DraStic doesn't support SD card/DLDI emulation. to combine the data files into the ROM itself with NitroFS you'll need to modify and compile the source code yourself
 

Apache Thunder

I have cameras in your head!
Member
Joined
Oct 7, 2007
Messages
4,573
Trophies
3
Age
37
Location
Levelland, Texas
Website
www.mariopc.co.nr
XP
7,245
Country
United States
Hey, so I'm trying to boot this port via drastic, but wherever i put the data files i lways get a "Please check your SD card" error. Is there a way to bypass this on emulator or maybe to combine the .nds file and data files? Sorry if it sounds unrealistic
DraStic doesn't support SD card/DLDI emulation. to combine the data files into the ROM itself with NitroFS you'll need to modify and compile the source code yourself


Could try and use my custom DLDI for this:

https://github.com/ApacheThunder/DLDI/tree/master/staging/ntro

This uses direct card reads with embedded fat image (you can just drop fat image in nitrofs with rebuilt rom of this game). This should work with emulators. I originally made this driver to make certain homebrew like this one work on my N-Cards without me having to re-compile them. You won't get any write support with this but this game at least seems functional with it. This driver is similar to the old fscr dldi driver created to read fat image from slot-2 flashcart nand/rom. (back in the days of using slot-2 cards for NDS mode)

I recently adjusted this driver for my EZP cart as I am able to reflash the card with a custom rom and I embedded a fat image into rom's nitrofs and use this driver to access it so my bootstrap can run something from internal rom even if microsd card isn't present at all. :D

The driver is reletively simple. The DLDI init function simply does card reads into a small buffer until it finds the magic bytes for MBR/fat image sector 0, then saves the rom read offset that sector was found at and uses it for all future reads.

EDIT: I recall testing the changes to make this work with my EZP cart with emulators so yeah using this driver would work with emulators. Even those that do not emulate SD/Flashcart storage.

The attached file is a version of this driver modified to get cached romctrl port flags from cached header location at 0x027FFE00 instead of using hardcoded values. (the hardcoded values were specific to N-Cards anyways)

Using this should be one work-around for you if you don't want to try modifying the source code. ;)

You can rebuild any homebrew rom with this as long as you know how to build fat images with something like WinImage and then use a rom tool to extract and rebuild existing homebrew/game roms to include said fat image file.

EDIT:

FYI even if you managed to recompile source code to use nitrofs properly you may still have trouble getting this game to find it. Because you are booting this via emulator and not via something like hbmenu on hardware, there will be no argv support....So the booted homebrew won't know where to find/read it's nitrofs. Unlike retail games, homebrew relies on SD/Flashcart DLDI to access NitroFS of the host homebrew rom. Because it won't exist in that emulator it has no way of finding or reading NitroFS.

Official SDK games don't have this issue because they use normal retail card reads to find nitrofs and load it in...which is somewhat similar to what I'm doing.

My DLDI driver might actually be the only way to run this game on Drastic if that emulator lacks SD/flashcart storage emulation.
:P
 

Attachments

  • ntro.zip
    743 bytes · Views: 9
Last edited by Apache Thunder,

Lee_Titt

New Member
Newbie
Joined
Feb 16, 2021
Messages
4
Trophies
0
Age
44
XP
51
Country
Austria
Thanks for the detailed instructions, unfortunately I tried looking into your method and made a disc image, however I have no idea how to inject the dldi file and the actual image of the data within the file. I will try looking into it further, sounds like a fun way to explore the file structure.
 

Apache Thunder

I have cameras in your head!
Member
Joined
Oct 7, 2007
Messages
4,573
Trophies
3
Age
37
Location
Levelland, Texas
Website
www.mariopc.co.nr
XP
7,245
Country
United States
You use something like dlditool to dldipatch the NDS file.

I've been using dslazy (an old NDS file tool) to extract NDS files to arm, banner, and header bin files. From there you create a NitroFS folder, place that fat image into that folder. Then rebuild nds file using ndstool. I created a cmd file for this at one point. Here's the command you can use as an example for your cmd file:


Code:
@Echo off
ndstool -c 3DPinball.nds -h header.bin -9 arm9.bin -7 arm7.bin -t banner.bin -d NitroFS
dlditool ntro.dldi 3DPinball.nds
pause

Included is the dlditool command I had setup as well. ;)

Note I'm not packing the TWL extended binaries in here as I had been building stuff exclusively for NTR mode only but since you are using emulator that probably won't matter much. Just be sure to disable the TWL mode bit in the ntr header if your emulator happens to be running this in DSi mode...but I don't recall if Drastic does DSi stuff. If it's only doing DS mode then you won't have to worry about that.
 

signer-ink-beast

Active Member
Newcomer
Joined
Feb 8, 2022
Messages
38
Trophies
0
Age
27
Location
Alaska
XP
145
Country
United States
This game plays remarkably well, even in DS mode.

I don't know if the reverse-engineered version of the game supports 256 color mode. I do know Full Tilt's version of Space Cadet does. I haven't explicitly checked the version included with Windows. It's been many years since I last tried that. But if I had to take a guess, it probably does.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: @Sicklyboy, Hello! :D