Shop OBEX P1 Docs P2 Docs Learn Events
Spin Hexagon for P2 (Version 1.2) - Page 2 — Parallax Forums

Spin Hexagon for P2 (Version 1.2)

2»

Comments

  • Wuerfel_21Wuerfel_21 Posts: 4,464
    edited 2021-03-02 21:34

    I just uploaded a new beta version and linked it in the first post. This is nothing new, just integrated the sdspi changes. I actually haven't tested it, haha.

  • Wuerfel_21Wuerfel_21 Posts: 4,464
    edited 2021-03-15 18:41

    Posted yet another new beta version. Still no actual changes, just more mucking with the SD code. I've changed to never release the select line, which seems to have gotten rid of the occasional excessive write latencies that were causing audio stutter during highscore saving (or in other words, that thing where it goes "GA ... ME OVER").

    Infact, if you want to use the FSRW included with the game for something else (which given that it actually works kinda well now, seems pretty attractive), you'll be delighted to hear that it's configurable. It defaults to normal operation, but call configureDAC with hog_mode set to true and it will hog the bus for reduced latency.

  • Wuerfel_21Wuerfel_21 Posts: 4,464
    edited 2021-03-19 23:17

    Just posted beta 4. Changes include:

    • Made video easier to configure, hopefully. Might need a little more documentation still, but now it automagically sets width, height and gui scale based on the resolution you chose. For SDTV, I handcrafted a 1152*240p mode.
    • Modified @rogloh 's video driver with improved color coefficients for NTSC/PAL.
    • Fixed playfield pulsing being resolution dependent (too little amplitude on low resolution, too much on high resolution)





    I'm going to edit the first post with updated information, so here is the old guff if you need it. THE BELOW IS OUTDATED INFO

    • At line 257, some variables are set

      • guiscale_x and guiscale_y control the size of text and other UI elements. In most cases, these should both have the same value. Here's a table of appropriate values:

        Resolution guiscale value
        640x480 2
        800x600 3
        1024x768 4
      • width_var and height_var must match the selected video mode

      • pixel_aspect you know when you need it
    • At line 275 , the desired video mode is selected. There are a number of presets, but you can also pass your own timing struct if you really need to.

  • Wuerfel_21Wuerfel_21 Posts: 4,464
    edited 2021-04-25 19:45

    Just set my P2 back up and was just loading Spin Hexagon to see if I hooked up the AV correctly when I ran into another amazing bug:
    When the P2 version creates a save file(i.e. it doesn't already exist), it creates it with a zero byte size. This works fine as long as you don't copy the file around, which is probably why I didn't notice this before.

    I debugged this all the way down and the SD card just seems to ignore the write that updates the directory entry when the file is flushed. It doesn't write garbage/zeroes/whatever, because that'd mess up the directory. No, it literally just ignores that write. But not the one that creates the entry?

    Good grief, this is some fat nonsense (haha).

  • Okay, I finally figured my way through the SD nonsense.

    • FSRW did not correctly check the block driver's error flag. All writes were actually erroring. But why?
    • Timeout! But why?
    • Well, the delay1s variable that determines timeout length was never initialized and presumably contained a low value.
    • The only function the timeout is checked in is in the sd_busy function.
    • Thus, every write was aborting early, causing the next command to not be properly processed, since the card was left in the busy state.

    Well, it's fixed now, and for good measure I've also bolted KyeFAT to the audio streaming block driver for even better SD stability.

    With this, I think Spin Hexagon for P2 is basically release quality. I still want to improve the colors a bit, but that's minor.
    Thus, I release version RC1!

    I'll also post the actually functioning SD driver separately soon, for better visibility.

  • pik33pik33 Posts: 2,350

    It seems a lot of good work was done with this (which can be reused in other project as well - KyeFAT ! )
    Maybe a HDMI driver can be also attached to this... I need some real free time to try - my driver is near beta...

  • It already does HDMI, you just have to edit platform.spin to set it.

  • And yes, I will make a dedicated post for the SD driver soon. I still have a problem when integrating it in PM (which previously crashed after saving due to reading corrupted code) where it sometimes doesn't want to load a save file due to checksum error, but I debugged that down to the P2 version computing bogus checksums, the SD driver is fine, so it's good to release.

  • Wuerfel_21Wuerfel_21 Posts: 4,464
    edited 2021-06-02 20:16

    Very embarrassingly, I just now noticed that the sound effects in the P2 release zips have been distorted by CRLF conversion, somehow. I just posted a V1.1 to address that.

    As far as I can tell, the P1 github release is unaffected. IDK why the P2 version isn't on github, should probably get onto that at some point.

  • Wuerfel_21Wuerfel_21 Posts: 4,464
    edited 2024-04-11 11:11

    By popular request:

    Posted a 1.2 - added USBNEW for inputs and fixed some stuff.

Sign In or Register to comment.