ROLL BOSS RUSH -{Homebrew Project}-(PSX/PSone/Playstation)

Discussion in 'Sony Programming and Development' started by isufje, Jun 28, 2012.

  1. isufje

    isufje Active Member

    Joined:
    Jun 12, 2012
    Messages:
    38
    Likes Received:
    8
  2. Gemini

    Gemini Retro developer

    Joined:
    Apr 1, 2008
    Messages:
    406
    Likes Received:
    88
    I finally took a shot at the sources in order to make them compatible with overlays and I've got a couple reports to send you:
    1) There is a lot of cloned code everywhere, that was a bitch to move into proper objects that can be shared with the rest of the engine. ;P The title screen was originally over 10,000 lines of code, now it's trimmed to 3028.
    2) There is a serious bug with the way you set up LibGS work area: it sets the packet base inside the stack, but it should be in a global variable because otherwise you'll be facing OT issues (on pSX it causes the screen to be always black).
    I'd also suggest you to use a smaller packet area. :p
    3) The title screen handles objects differently than other bits of code. I noticed it uses mixed ObjectHandler and ObjectHandler2 a lot, causing type mismatch with some of the initializers.

    If you want me I can send you more stability reports and the updated code as more of the engine is ported over.
     
    Last edited: Jan 2, 2015
  3. isufje

    isufje Active Member

    Joined:
    Jun 12, 2012
    Messages:
    38
    Likes Received:
    8
    Thanks for the reports. I appreciate it a lot. It's nice that you took time to work on the overlay thing, but you didn't have to though... I'm still working on improvements and I still like working with separate exe's at this time. Since I'm constantly updating source code with modifications, it might not be a good idea to overly this version source code (if you know what i mean) But if you want to i can't stop you.
     
  4. isufje

    isufje Active Member

    Joined:
    Jun 12, 2012
    Messages:
    38
    Likes Received:
    8
    What i would like some help on is how to reverse engineer some psf files that don't use standard VAB/SEQ format. If you don't already know, i get all the in game music from psf files that have user friendly VAB and SEQ recognizable files but a lot of psf's use custom files with there own drivers. I heard you're good with assembly and reverse engineering. If you could help me with that it would be great :D
     
  5. Gemini

    Gemini Retro developer

    Joined:
    Apr 1, 2008
    Messages:
    406
    Likes Received:
    88
    No worries, I did this mainly to check why the game wouldn't run on pSX, then I got sucked into it and tried the overlay thing. :p It shouldn't be too much of a problem even with updates to JUMBOJUNK and other big sources as those should work out of the box with the macro stuff I've added to manage a lot of the code as global scope, though something like an SVN or Git on Google Code wouldn't be too bad for updates. I also noticed something weird about Bomb-Woman's sources: BOMB1.c seems to have been replaced by binary data, rather than being C source for the middle loader. You can check the changes I made here.

    What I did so far with it was to separate JUMBOJUNK, Roll's code, and some other repeated pieces of code to object files which are linked into the main exe (it's currently around 850 KB). I moved most .h code to proper .c files since they cause a lot of trouble to the compiler and make it hard to compile glued code that can be seen from other functions. I've also moved the universal variables to a structure so that you don't need to update that huge address table manually. Right now I've got converted the title screen+boss selection screen (61.3 KB), Bomb Woman (38.5 KB), and Yellow Devilette (50.3 KB) into separate modules that seem to load a bit faster than they previously did thanks to the big executables much reduced and those loaders gone. The main issue is that I can't get Bomb Woman to work due to memory allocation going wrong somewhere in the TMD initialization. :/

    On a matter related to improvements, is Slash Woman's code still lagging when doppel mode is on? I think I know why it was slowing down in the original: many of your routines use a lot of parameters, which end up in the stack and the processor places those into the stack (it's extremely slow due to RAM access timing). You could make it almost 5 times faster by moving the stack to the scratch pad, exactly like LibGS does for drawing 3D primitives. Basically, you call a function that replaces SP to the scratchpad top address (0x1F800000+1020), then you execute your code as usual, finally you restore the stack to RAM when you're done. Another cause is the fact that your TMD data uses a lot of triangulated faces instead of quads+triangles. In other words you're drawing a lot more polygons than you should, plus two triangles occupy way more room than a single quad. ;P

    It's extremely hard grabbing tracker code from a game and implement it into another because of SPU library calls, segment linking, hardware counters, and many more aspects that are quite a mess to separate from the original exe where they come from. It could still be done by using properly extracted assembly code, but the way your executables are currently configured makes it a bit hard to inject that kind of code via standard linking. Another big issue is LibSND causing a lot of issues with other drivers: it's extremely picky about SPU transfers and synchrony, most of the time causing unexpected crashes because of internal library state variables and funny stuff it does in the abstraction layer it uses to play music scores.

    [EDIT] I made a quick video test for you to show load speed improvements:

    There are still a ton of bugs related to audio and memory allocation gone wrong due to overlay configuration in RAM. Anyways, code has been uploaded to the SVN to show how it can be turned into overlay modules. It's not easy, but it's definitively a nice improvement. ;P Now for the actual load speed, I think the main issue you have there is with all that TIM load segmentation. If you could merge them into one file per task the whole game would load a lot faster. Most of the slowness is caused by TIM files being small and the CD unit having to seek a lot around the disk to fetch them; the less seek you perform the better.
     
    Last edited by a moderator: May 25, 2015
  6. isufje

    isufje Active Member

    Joined:
    Jun 12, 2012
    Messages:
    38
    Likes Received:
    8


    -Little update
    Beta Testing Underwater Mechanics for Bubble Woman Stage. If I end up having performance issues i will decrease the amount of fish rendered. Also I might end up changing the way the bubbles look to be more realistic... Sorry if anyone is still waiting for Game Updates, but I've been so busy with Job/Work that I haven't had any time to do much of anything except a whole bunch of nothing :(
     
    Last edited by a moderator: May 25, 2015
  7. NovaFox

    NovaFox Rapidly Rising Member

    Joined:
    Dec 2, 2014
    Messages:
    84
    Likes Received:
    1
    Cool update! I haven't a chance to play the game yet, but I can tonight.
    Just a suggestion, I'd slow down the background wave effect a lot, it's a bit nauseating to me.
    Awesome work regardless
     
    Last edited by a moderator: May 25, 2015
  8. isufje

    isufje Active Member

    Joined:
    Jun 12, 2012
    Messages:
    38
    Likes Received:
    8
    Thanks. I'll experiment with the background speed before a final release.
     
  9. isufje

    isufje Active Member

    Joined:
    Jun 12, 2012
    Messages:
    38
    Likes Received:
    8


    -Video Update. Will be uploading the iso soon.
     
    zouzzz and Johnny like this.
  10. Johnny

    Johnny Gran Turismo Freak and Site Supporter 2013,2015

    Joined:
    Mar 14, 2004
    Messages:
    6,231
    Likes Received:
    404
    This is amazing! I really hope someday we'll be able to buy a copy of this, like the homebrews for other consoles.
     
  11. Gemini

    Gemini Retro developer

    Joined:
    Apr 1, 2008
    Messages:
    406
    Likes Received:
    88
    Intensive as usual. Love it.
     
  12. isufje

    isufje Active Member

    Joined:
    Jun 12, 2012
    Messages:
    38
    Likes Received:
    8
  13. isufje

    isufje Active Member

    Joined:
    Jun 12, 2012
    Messages:
    38
    Likes Received:
    8
    -Thanks. Yes, I hope someday I can make this game into a physical copy... (it's actually something i'm working on, but don't tell anybody :-D ) but for right now it's just free download material with source.

    -Thanks :)
     
  14. Johnny

    Johnny Gran Turismo Freak and Site Supporter 2013,2015

    Joined:
    Mar 14, 2004
    Messages:
    6,231
    Likes Received:
    404
    It's great to hear that. Keep us informed. :cool:
     
  15. isufje

    isufje Active Member

    Joined:
    Jun 12, 2012
    Messages:
    38
    Likes Received:
    8
    Last edited: Dec 30, 2015
    gwald and Johnny like this.
  16. isufje

    isufje Active Member

    Joined:
    Jun 12, 2012
    Messages:
    38
    Likes Received:
    8
    Traace, Johnny and gwald like this.
  17. Johnny

    Johnny Gran Turismo Freak and Site Supporter 2013,2015

    Joined:
    Mar 14, 2004
    Messages:
    6,231
    Likes Received:
    404
    Awesome to hear you are still around and working on it!
     

Share This Page