@Wuerfel_21 said:
Well that's an oddity. Do you have an EVAL (with HyperRAM or 96MB board) on hand to sanity check against?
I do but it would take some time to dig it out and set it up, might have to wait for that.
If it crashes this often you may also have insufficient 5V power, as I noticed earlier.
Perhaps, although this is on my Bull Ant board and it is powered via 12V using the step down regulator on the Edge and I know this supply would be able to source 500mA at the very least for powering PVR HDD's and this gives good wattage for the P2-Edge.
Am kinda surprised you are getting good HyperRAM results with the P2 around 340MHz. I thought mine would typically top out around 300MHz or so, or are you clocking at half speed?
@rogloh said:
Am kinda surprised you are getting good HyperRAM results with the P2 around 340MHz. I thought mine would typically top out around 300MHz or so, or are you clocking at half speed?
Yea my HyperRAM driver never does the full DDR rate. So performance should be on par with PSRAM8.
Ok, tried HyperRAM on Pin 0 and Pocky with EVAL board and above timing. Same first result as with PSRAM, hangs after initial title screens with blank video output, other games running ok. Second try got into actual game menu, but after start it just hung with blank output.
Okay, so that's a sanity check. Something's really cooked. Make sure your file isn't corrupted or anything. MD5 should be e74e067787723bc54093a9c03f290e5d. Also, it does seem that @ersmith broke the compiler and nothing works now. Revert whatever silly edit you made to get it to run and downgrade to an older compiler until it isn't broken anymore. Also here's an official beta02 ZIP with the row boundary fix (shouldn't matter to hyperram)
EDIT: flexspin v6.9.7 (git 438d856cc6da8043b22cb6ee832f204ff54682b9) is last good version
Ok so it turns out I had tried to run P&R 2, not P&R (my mistake) due to 8.3 filename limitations not showing full title. The earlier post on game compatibility indicates it would thud and black screen which is basically what I saw in general when running P&R 2 apart from a couple of times it got a bit further.
Once I ran the original versionof P&R it worked on both the EVAL with HyperRAM and the P2Edge with PSRAM with the same timing I tried last time:
@rogloh said:
Ok so it turns out I had tried to run P&R 2, not P&R (my mistake) due to 8.3 filename limitations not showing full title. The earlier post on game compatibility indicates it would thud and black screen which is basically what I saw in general when running P&R 2 apart from a couple of times it got a bit further.
Haha I was starting to think that's the case I think P&R 2 needs 65816/SPC700 hard-sync (a planned feature) to not go banana. Also, there's a useful tool called NSRT that can be configured to bulk-rename SFC files (that it knows about) to sensible FAT names (so you get stuff like PRCKYU.SFC or LZELDAU.SFC ("U" -> USA)) and also remove or add those annoying 512 byte headers (though MisoYume should be able to handle them now)
If there's no instant crash, that's where the interesting part begins: Does it randomly die some 3 to 20 minutes later?
Pointing a fan at my Edge fixed it for me. It was running over 8 hours with the fan on. When I turned the fan off, it died 7 minutes later.
When I initially hit these errors using a 6.2 build of spin2cpp I automatically went and grabbed top of tree for spin2cpp from yesterday thinking Ada will need the latest & greatest build like usual to fix these types of issues and ultimately that did seem to build and let me run MisoYume, though perhaps there are going to be new issues with some games as I've only tried a few.
Flexspin 6.9.8 did give this error below unless you change the = into a : in the OBJ section of config.spin2 but since when is an equals symbol allowed in the OBJ section as the separator anyway? I thought it was always a colon symbol to separate object name from file name, unless fastspin syntax is extended from PNut SPIN2 in this area.
The equals sign creates an "abstract object" which doesn't actually create an instance. You'd be able to use it to dereference an object pointer, but in this case I just use it to grab the constant definitions.
@Wuerfel_21 said:
The equals sign creates an "abstract object" which doesn't actually create an instance. You'd be able to use it to dereference an object pointer, but in this case I just use it to grab the constant definitions.
Ok good to know. Must be something new or specific to flexspin, this is not listed in latest Parallax SPIN2 doc in OBJ section.
There's some fairly ferocious changes in flexspin right now, due to needing a major parser overhaul to support Spin2 structures, so it is pretty unstable. There is a stable branch though (release/v6.9) which might be safer to use.
In unrelated news, I implemented more robust controller port handling in MisoYume, Super Mario All-Stars and Secret of Evermore now have working inputs. The latter seems fully OK now, the former has minor video glitches.
Other than that, I removed a workaround for a bug in flexspin that's been fixed for a few releases now and I removed some nonsense in the default config and made it target EC32MB by default (bring a fan).
So no big change, but maybe I can get myself to tackle one of the big issues now.
EDIT: Also, some of the RAM-related changes in beta02 (presumably cache length now being larger for 16 bit RAM) seem to have reduced time crust in some games, which is nice-ish I guess?
It would be cool if there was a way to restart back to the game menu screen rather than needing to reset/reboot from flash or reload MisoYume via serial. Maybe there's a reason not to, like the memory gets trashed and you can't easily restart from scratch, not sure.
@rogloh said:
It would be cool if there was a way to restart back to the game menu screen rather than needing to reset/reboot from flash or reload MisoYume via serial. Maybe there's a reason not to, like the memory gets trashed and you can't easily restart from scratch, not sure.
There is. Either ctrl+esc on keyboard or hold start+down for a few seconds.
I started to testing this (at last - I have no place and time now to play with a P2: (other projests+moving and renovation).
Compiled wih the fresh Flexprop from github, works. Can be started from a binary file using BRUN from Retromachine Basic (I still have to implement args for this)
However the flexprop tells
Program size is 520364 bytes
warning: Can't truncate file
and the resulting binary is 509 KB long.
The default config (except moving VGA+audio to P8) causes the monitor think it is 1280x720 - the right part of the picture was cut off. Manual settings allowed me to center the screen
So I recompiled this for HDMI - no more problems with the picture
Loaded Super Mario World: I have now a title screen and a fancy music. I have no gamepad here... so I have now to read the topic and learn if and how I can use a keyboard. Works several minutes now, the P2 is hot but still OK. (it's this yolkless EC32).
Edit: I managed to start it using a keyboard. Still works without a fan
Edit 2: Zelda - the legends.. works. I also tried Doom: 2 MB file, does not work (black screen), reacts on ctrl-esc to return to the menu
Program size is 520364 bytes
warning: Can't truncate file
That really shouldn't happen. Can you post the entire output from build.sh?
Edit 2: Zelda - the legends.. works. I also tried Doom: 2 MB file, does not work (black screen), reacts on ctrl-esc to return to the menu
Doom won't work because it needs a coprocessor (SuperFX2 GSU). Should add an error message for that. Wolf3d sorta works though (DMA speed problem is there)
I didn't use .sh (as in Windows) - I used Flexprop with a custom command line.
Here is 'lower' file output:
"C:/Users/Piotr/Downloads/flexprop-6.9.4/flexprop/bin/flexspin" -2 -l --compress "C:/Users/Piotr/Downloads/misoyume_beta03/misoyume_lower.spin2"
Propeller Spin/PASM Compiler 'FlexSpin' (c) 2011-2024 Total Spectrum Software Inc. and contributors
Version 6.9.8-HEAD-v6.9.8 Compiled on: May 18 2024
misoyume_lower.spin2
|-MegaVGA_ohmyshit.spin2
misoyume_lower.spin2
|-MegaVGA_ohmyshit.spin2
Executable compressed from 450732 to 70500 bytes (15.64%, 168 stub bytes)
Done.
Program size is 520364 bytes
warning: Can't truncate file
Finished at Mon May 20 10:16:21 2024
'Upper' (run again to create a log
"C:/Users/Piotr/Downloads/flexprop-6.9.4/flexprop/bin/flexspin" -2 -E -H 360448 -O1,extrasmall,inline-single,experimental,aggressive-mem --charset=shiftjis -DFF_FS_TINY=1 -DFF_FS_NORTC=1 "C:/Users/Piotr/Downloads/misoyume_beta03/misoyume_upper.spin2"
Propeller Spin/PASM Compiler 'FlexSpin' (c) 2011-2024 Total Spectrum Software Inc. and contributors
Version 6.9.8-HEAD-v6.9.8 Compiled on: May 18 2024
misoyume_upper.spin2
|-MegaVGA_ohmyshit.spin2
|-MegaVGA_ohmyshit.spin2
|-usbnew.spin2
|-padmap_parser.spin2
|-libc.spin2
|-|-libc.a
|-fsadapter.c
|-psram16drv.spin2
fatfs_vfs.c
|-fatfs.cc
fflush.c
fputs.c
fopen.c
fseek.c
fwrite.c
sprintf.c
malloc.c
strncat.c
strncmp.c
strncpy.c
opendir.c
stat.c
_mount.c
errno.c
memcmp.c
strchr.c
sdmm.cc
localtim.c
malloc.c
posixio.c
bufio.c
isatty.c
fileno.c
dofmt.c
vfs.c
strncpy.c
strncat.c
strncmp.c
getenv.c
ctype.c
ioctl.c
fmt.c
strncmp.c
misoyume_upper.p2asm
Done.
Program size is 90284 bytes
Finished at Mon May 20 16:33:25 2024
Ahh, I see what's happening, it's a bug with the --compress flag. It still works because the resulting file will have the uncompressed original version first and then the compressed file is appended onto it. It's supposed to empty out the file first. Could it be that this never worked on Windows at all and no one noticed? @ersmith do you have a winblows test machine at hand? I currently don't.
Anyways, you can remove --compress, it doesn't have any effect on the program other than making the file smaller.
@Wuerfel_21 said:
Ahh, I see what's happening, it's a bug with the --compress flag. It still works because the resulting file will have the uncompressed original version first and then the compressed file is appended onto it. It's supposed to empty out the file first. Could it be that this never worked on Windows at all and no one noticed? @ersmith do you have a winblows test machine at hand? I currently don't.
I have a laptop that I use for some testing, but I do a lot of preliminary testing with Wine. The "can't truncate file" warning does appear when flexspin.exe is run under wine. It looks like the Microsoft library doesn't support freopen with a NULL parameter . The patch below seems to fix it:
diff --git a/frontends/common.c b/frontends/common.c
index 6d745283..24d35008 100644
--- a/frontends/common.c
+++ b/frontends/common.c
@@ -1275,9 +1275,18 @@ DoPropellerPostprocess(const char *fname, size_t eepromSize)
WARNING(NULL, "I/O error while compressing");
}
Flexbuf compressed = CompressExecutable(buffer,len);
+#ifdef WIN32
+ fclose(f);
+ f = fopen(fname, "w+b");
+ if (!f) {
+ ERROR(NULL, "Can't truncate file");
+ return -1;
+ }
+#else
if (!freopen(NULL,"w+b",f)) { // Do this to make file actually smaller
WARNING(NULL, "Can't truncate file");
}
+#endif
fwrite(flexbuf_peek(&compressed),flexbuf_curlen(&compressed),1,f);
len = flexbuf_curlen(&compressed);
flexbuf_delete(&compressed);
@Wuerfel_21 said:
Ahh, I see what's happening, it's a bug with the --compress flag. It still works because the resulting file will have the uncompressed original version first and then the compressed file is appended onto it. It's supposed to empty out the file first. Could it be that this never worked on Windows at all and no one noticed? @ersmith do you have a winblows test machine at hand? I currently don't.
I have a laptop that I use for some testing, but I do a lot of preliminary testing with Wine. The "can't truncate file" warning does appear when flexspin.exe is run under wine. It looks like the Microsoft library doesn't support freopen with a NULL parameter . The patch below seems to fix it:
Wow, I didn't even think of trying it with wine. Anyways for fixing my jank (with more jank)
Comments
I do but it would take some time to dig it out and set it up, might have to wait for that.
Perhaps, although this is on my Bull Ant board and it is powered via 12V using the step down regulator on the Edge and I know this supply would be able to source 500mA at the very least for powering PVR HDD's and this gives good wattage for the P2-Edge.
Anyways, for EVAL+HyperRAM you'd do (assuming RAM board on basepin 0)
For EVAL+96MB you'd
Am kinda surprised you are getting good HyperRAM results with the P2 around 340MHz. I thought mine would typically top out around 300MHz or so, or are you clocking at half speed?
Yea my HyperRAM driver never does the full DDR rate. So performance should be on par with PSRAM8.
Makes more sense then. I found my EVAL, might give it a try in a moment to see what happens.
Ok, tried HyperRAM on Pin 0 and Pocky with EVAL board and above timing. Same first result as with PSRAM, hangs after initial title screens with blank video output, other games running ok. Second try got into actual game menu, but after start it just hung with blank output.
Okay, so that's a sanity check. Something's really cooked. Make sure your file isn't corrupted or anything. MD5 should be e74e067787723bc54093a9c03f290e5d. Also, it does seem that @ersmith broke the compiler and nothing works now. Revert whatever silly edit you made to get it to run and downgrade to an older compiler until it isn't broken anymore. Also here's an official beta02 ZIP with the row boundary fix (shouldn't matter to hyperram)
EDIT: flexspin v6.9.7 (git 438d856cc6da8043b22cb6ee832f204ff54682b9) is last good version
Ok so it turns out I had tried to run P&R 2, not P&R (my mistake) due to 8.3 filename limitations not showing full title. The earlier post on game compatibility indicates it would thud and black screen which is basically what I saw in general when running P&R 2 apart from a couple of times it got a bit further.
Once I ran the original versionof P&R it worked on both the EVAL with HyperRAM and the P2Edge with PSRAM with the same timing I tried last time:
Haha I was starting to think that's the case I think P&R 2 needs 65816/SPC700 hard-sync (a planned feature) to not go banana. Also, there's a useful tool called NSRT that can be configured to bulk-rename SFC files (that it knows about) to sensible FAT names (so you get stuff like PRCKYU.SFC or LZELDAU.SFC ("U" -> USA)) and also remove or add those annoying 512 byte headers (though MisoYume should be able to handle them now)
If there's no instant crash, that's where the interesting part begins: Does it randomly die some 3 to 20 minutes later?
Pointing a fan at my Edge fixed it for me. It was running over 8 hours with the fan on. When I turned the fan off, it died 7 minutes later.
That's more than two years back!
Was supposed to read 6.9.7
When I initially hit these errors using a 6.2 build of spin2cpp I automatically went and grabbed top of tree for spin2cpp from yesterday thinking Ada will need the latest & greatest build like usual to fix these types of issues and ultimately that did seem to build and let me run MisoYume, though perhaps there are going to be new issues with some games as I've only tried a few.
Flexspin 6.9.8 did give this error below unless you change the = into a : in the OBJ section of config.spin2 but since when is an equals symbol allowed in the OBJ section as the separator anyway? I thought it was always a colon symbol to separate object name from file name, unless fastspin syntax is extended from PNut SPIN2 in this area.
The equals sign creates an "abstract object" which doesn't actually create an instance. You'd be able to use it to dereference an object pointer, but in this case I just use it to grab the constant definitions.
Anyways, it got fixed in the meantime, just grab the git now it'll be fine.
Ok good to know. Must be something new or specific to flexspin, this is not listed in latest Parallax SPIN2 doc in OBJ section.
Just tried that. Yeah it builds now with the equals sign back in the file.
Sorta glad to hear it’s not just my boards that need a fan to run this…
Definitely pushing the envelope…
There's some fairly ferocious changes in flexspin right now, due to needing a major parser overhaul to support Spin2 structures, so it is pretty unstable. There is a stable branch though (release/v6.9) which might be safer to use.
In unrelated news, I implemented more robust controller port handling in MisoYume, Super Mario All-Stars and Secret of Evermore now have working inputs. The latter seems fully OK now, the former has minor video glitches.
Other than that, I removed a workaround for a bug in flexspin that's been fixed for a few releases now and I removed some nonsense in the default config and made it target EC32MB by default (bring a fan).
So no big change, but maybe I can get myself to tackle one of the big issues now.
EDIT: Also, some of the RAM-related changes in beta02 (presumably cache length now being larger for 16 bit RAM) seem to have reduced time crust in some games, which is nice-ish I guess?
It would be cool if there was a way to restart back to the game menu screen rather than needing to reset/reboot from flash or reload MisoYume via serial. Maybe there's a reason not to, like the memory gets trashed and you can't easily restart from scratch, not sure.
There is. Either ctrl+esc on keyboard or hold start+down for a few seconds.
Great. I was trying random combinations hopeful for such a thing but didn't stumble onto it. Very useful. Thanks!
I started to testing this (at last - I have no place and time now to play with a P2: (other projests+moving and renovation).
Compiled wih the fresh Flexprop from github, works. Can be started from a binary file using BRUN from Retromachine Basic (I still have to implement args for this)
However the flexprop tells
and the resulting binary is 509 KB long.
The default config (except moving VGA+audio to P8) causes the monitor think it is 1280x720 - the right part of the picture was cut off. Manual settings allowed me to center the screen
So I recompiled this for HDMI - no more problems with the picture
Loaded Super Mario World: I have now a title screen and a fancy music. I have no gamepad here... so I have now to read the topic and learn if and how I can use a keyboard. Works several minutes now, the P2 is hot but still OK. (it's this yolkless EC32).
Edit: I managed to start it using a keyboard. Still works without a fan
Edit 2: Zelda - the legends.. works. I also tried Doom: 2 MB file, does not work (black screen), reacts on ctrl-esc to return to the menu
That really shouldn't happen. Can you post the entire output from build.sh?
Doom won't work because it needs a coprocessor (SuperFX2 GSU). Should add an error message for that. Wolf3d sorta works though (DMA speed problem is there)
I didn't use .sh (as in Windows) - I used Flexprop with a custom command line.
Here is 'lower' file output:
'Upper' (run again to create a log
Ahh, I see what's happening, it's a bug with the --compress flag. It still works because the resulting file will have the uncompressed original version first and then the compressed file is appended onto it. It's supposed to empty out the file first. Could it be that this never worked on Windows at all and no one noticed? @ersmith do you have a winblows test machine at hand? I currently don't.
Anyways, you can remove --compress, it doesn't have any effect on the program other than making the file smaller.
Okay, here's some more minor fixes because ???
I have a laptop that I use for some testing, but I do a lot of preliminary testing with Wine. The "can't truncate file" warning does appear when flexspin.exe is run under wine. It looks like the Microsoft library doesn't support freopen with a NULL parameter . The patch below seems to fix it:
It works now. The compressed file has now 69 KB and still can be started from the Basic.
Wow, I didn't even think of trying it with wine. Anyways for fixing my jank (with more jank)