Sonic X-treme - Point of View - Info + help required

Discussion in 'Rare and Obscure Gaming' started by jollyroger, Oct 20, 2014.

  1. jollyroger

    jollyroger Gutsy Member

    Joined:
    Oct 18, 2008
    Messages:
    458
    Likes Received:
    256
    Quick update: I am still working on the Saturn, tracking down probably the single worst crash bug, which is due to bad timing and the way the Saturn uses display lists and framebuffers.
    In order to speed up the frame rate, the code avoids proper synchronization with the framebuffer, and causes a deadlock due to a data race condition, which freezes the system.

    Using proper synchronization slows down the code a lot, to around 10-12 FPS from 18-20 FPS, so I am looking to see if there is a workaround that I can use to avoid the race condition, while still allowing the code to run only slightly behind the VDP1.

    This is going to take some time, but after this things should get better.

    Jolly
     
  2. Energy

    Energy Spirited Member

    Joined:
    Oct 26, 2009
    Messages:
    118
    Likes Received:
    37
    You mention the saturn version is a build halfway between v37 and v42 (packageX). PackageX has the moving platform paths - no chance that the saturn intermediate version has the paths code there but commented out? That would make my day if so.

    Not expecting it though. Good luck with the framebuffer issue.
     
  3. jollyroger

    jollyroger Gutsy Member

    Joined:
    Oct 18, 2008
    Messages:
    458
    Likes Received:
    256
    None of the source code we have contains anything for the paths, sorry.
     
  4. Energy

    Energy Spirited Member

    Joined:
    Oct 26, 2009
    Messages:
    118
    Likes Received:
    37
    To be expected; Andrew75 had said as much, but you mentioning this middle ground version gave a small glimmer of hope. Still, looking forward to see your further advancements.

    So you're planning to port it to a toaster right? ;) heheh
     
  5. itsthinkingstil

    itsthinkingstil Rapidly Rising Member

    Joined:
    Nov 9, 2014
    Messages:
    77
    Likes Received:
    60
    And jolly was the rsd right that the editor can scratch that part on you back, drive you to the airport and make a two min egg? Or is it even more powerful lol
     
    Last edited: Mar 27, 2015
  6. jollyroger

    jollyroger Gutsy Member

    Joined:
    Oct 18, 2008
    Messages:
    458
    Likes Received:
    256
    Oh it can do way more than that ;)
     
  7. Druidic teacher

    Druidic teacher Officer at Arms

    Joined:
    Jun 6, 2006
    Messages:
    3,643
    Likes Received:
    129
    x
     
    Last edited: Jun 22, 2017
  8. darkspire17

    darkspire17 None

    Joined:
    Oct 24, 2014
    Messages:
    447
    Likes Received:
    115
    is the recent leak able ot have dynamic paths? like in jade gully
     
  9. Energy

    Energy Spirited Member

    Joined:
    Oct 26, 2009
    Messages:
    118
    Likes Received:
    37
    Literally what I asked just above.
    No. There is no code for the paths.
    Could they be added in? Yes - but would have to be coded in from scratch.
     
  10. jollyroger

    jollyroger Gutsy Member

    Joined:
    Oct 18, 2008
    Messages:
    458
    Likes Received:
    256
    Some more news: finally I got the sync code working properly, the engine now doesn't crash trying to force the VDP1 to draw while the framebuffer is changing without proper management of the end of write flags in the vblank interrupt.

    I actually changed the code to not use the VBE erase/draw pass in the vblank, as from my tests I remember it was more beneficial to use a large polygon to clear the screen instead, and it makes the code less dependent on synchronization with the vblank, which in turn frees up some CPU cycles to do some work.

    I also tried to do a full double buffer overlap between the VDP1 drawing and the CPU writing the new display list, but it was a naive attempt, as the code is really not written to access memory properly and in the end it made the frame rate actually slower due to contention between CPU and VDP for access to the framebuffer SDRAM.

    With that largely out of the way, I fixed another giant issue in the polygon camera projection code, which did not perform any clipping whatsoever. For now the fix is just to identify troublesome polygons (exceeding the VDP1 coordinates region) and not draw them, eventually I will write a proper clipping fix.

    The engine now seems to be relatively robust, using a very basic level it doesn't crash all the time, I can actually move Sonic around the level (slowly at times due to frame rate).

    Depending on the amount of polygons and their size, the frame rate varies between 10 and 25 FPS, even 30 when the screen is mostly blank.

    The way the rendering engine is written performs very poorly on the Saturn, which needs to overlap as much as possible CPU work with the VDP1, so eventually we will have make some pretty radical changes to speed it up.

    Finally I can now resume working with Andrew75 on loading more complex levels, but first I would like to try to make a very simple "as-is" release, similarly to what we did for v37.

    After the work on loading other levels I will get to profiling which parts of the code suffer the most and start tuning.

    Stay tuned...

    Jolly
     
  11. Yakumo

    Yakumo Pillar of the Community *****

    Joined:
    Mar 14, 2004
    Messages:
    20,515
    Likes Received:
    1,050
    So looking forward to this Saturn version. I may sound wrong but playing it on the PC doesn't do anything for me because in my eyes this was only a Saturn product. I know too well there's a PC version but I have no interest in that.
     
  12. zeldarocks

    zeldarocks Member

    Joined:
    May 28, 2010
    Messages:
    6
    Likes Received:
    0
    Jolly: After some further polishing is done, will you start working on actually producing a "fun," relatively complete recreation of Sonic Xtreme?

    And when can we expect a release of the editor?
     
  13. jollyroger

    jollyroger Gutsy Member

    Joined:
    Oct 18, 2008
    Messages:
    458
    Likes Received:
    256
    The plan is to progressively try to make it more playable, once the "as-is" code is in a state where it doesn't break all the time, but I it will likely never get to the level of AXSX, as I am doing this mostly for preservation rather than developing the game, and I just don't have the time.

    Something I was considering is that perhaps at some point during the summer I could try to expose some of the engine internals through an API and release a binary that people can link other C code to, or embed in the engine a LUA interpreter so that people can add a better control system and perhaps AI for the baddies.

    Just thoughts for now, but this would allow me to release something that people can extend/mod, without releasing the source code.

    As for the editor, now that I am a bit more relaxed (fixing the Saturn interrupt data races is not too fun) we can prepare the v37 editor (on OpenGL) for release too.

    Jolly
     
  14. Energy

    Energy Spirited Member

    Joined:
    Oct 26, 2009
    Messages:
    118
    Likes Received:
    37
    Ok so this is very exciting. Can't wait :)
     
  15. z3ntn3l

    z3ntn3l 16 Bit Superstar

    Joined:
    May 11, 2005
    Messages:
    128
    Likes Received:
    1
    I think the same as you. A Saturn version is the real deal for me and bonus points for working fisheye view ;)

    This shouldnt sound like a request or something, its just my opinion. Thank you guys for your work!
     
  16. Clovergruff

    Clovergruff Active Member

    Joined:
    Jun 1, 2013
    Messages:
    25
    Likes Received:
    0
    While I've always thought SX has always been a saturn product, just as Yakumo said, I personally would much rather see SX being on a PC.

    But don't get me wrong, I get it, it's a console thing and I'd honestly like to check it out on there as well, even though I didn't grow up with the Saturn or anything. In fact, I've never even seen a single working Saturn console in my life, let alone played games on one (see, I had other systems).

    The thing is, I just don't see SX evolving on the Saturn. The PC version obviously has a much brighter future, as it's far easier to develop for it. The Saturn is incredibly limiting and keeping SX on there just wouldn't be the best idea in my opinion.
     
  17. THE#1SonicFan

    THE#1SonicFan Newly Registered

    Joined:
    Oct 25, 2008
    Messages:
    4
    Likes Received:
    0
    I'm a-ok with not getting a working Saturn version. Although I'd prefer it on Saturn, I have one of those 3 in 1 PC Joy Box's that converts Saturn controllers to USB. I don't foresee us getting a working saturn version with the fisheye lense AND a stable frame rate quite honestly, as much as I would love to see that happen.
     
    Last edited: Apr 2, 2015
  18. jollyroger

    jollyroger Gutsy Member

    Joined:
    Oct 18, 2008
    Messages:
    458
    Likes Received:
    256
    So, we released a first "as-is" Saturn version of the v40 engine, I hope you enjoy it, much more to come...

    Jolly
     
  19. z3ntn3l

    z3ntn3l 16 Bit Superstar

    Joined:
    May 11, 2005
    Messages:
    128
    Likes Received:
    1
    sx.jpg

    Works on my PAL Saturn just like you described it. Thank you very much!
     
  20. Cr4z3d

    Cr4z3d Active Member

    Joined:
    Dec 22, 2014
    Messages:
    48
    Likes Received:
    0
    I've already said it on Senntient, but excellent work Jolly! You've gotten quite far with this already in such a short time. WISH I had a Saturn now, hah. Been wanting to get one for awhile now actually.
     
    Last edited: Apr 6, 2015
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page