Logicon
in Propeller 2
Here's a game console based on the @Wuerfel_21 emulators and the P2 SWaP module.
This was my son's idea. He thinks that if it is home made, he will be able to bring it to school.
(But now he's wondering what kind of lawyers we have access too
He came up with the name too...
Anyway, was already making this Eval style adapter for these 2.3" display modules when decided we could just squeeze a Stamp module in underneath and make it stand alone.
Appears to be working. Just need to add speakers and some kind of power supply (right now is USB-C powered).
Needs Prop Plug for now to program.
Comments
Testing with this wireless USB NES controller. Might keep that and find a way to make the controller detachable from the enclosure...
I guess this is where having an SD program loader would come in.
Also cool things happening on forum right now.
Spam-tastic!
Downloaded one from @pik33
Seems fairly straightforward... Copy binary to PSRAM. Then, copy PSRAM to HUB, stop all other cogs and reboot.
@RossH Has a version that doesn't need PSRAM. But, this has it, so might as well use it...
Suppose without lcd could add a second P2 to Eval style P2 board…
Not thinking that is particularly useful though…
Suppose should have added HDMI output. Think can do HDMI and LCD6 at same time, right @Wuerfel_21 ?
Not with 1 cog. I think you could detect the HPD signal on the HDMI port and decide the mode on that. But hot-switching would be difficult.
Ok, thanks. Now wondering if LCD will keep displaying an image if LCD6 input stops. Imagine not, but guess should try...
Was going to make a unit with HDMI output as a separate project, but now think they can be combined into one.
Found a little 2 port USB hub that should work nicely for 2 player...
No, it'll go into this weird lock-up state where the image fades to white.
@Wuerfel_21 Is there a way to control volume in the code?
Yes and no. There's some values in the code that control volume, but they're not really meant to be changed. If you digitally reduce the signal amplitude, you do not lower the DAC noise floor, so it's not really a great idea. If it's about making it louder: There's kind of a problem there, the audio synthesized by sound chips naturally has rather high dynamic range, so it's rather quiet compared to, e.g. playing WAV files of pop music.
Ok, have to decide between digital and mechanical pot…
Mechanical might add to retro vibe…
mechanical is good in that it will keep state across resets/different apps.
Might have to work on a menu system sooner than planned...
Seems the SWaP module can't use uSD when Megayume is flashed.
For some reason that is not yet understood, have to fire up FSRW first to make FatFS work.
The flash was previously loaded with this simple code to mount using FSRW and then stop:
So, guess options are figure out why FatFS isn't working or to create a bootloader that need to do anyway...
Case test 1 is now printing...
@Wuerfel_21 Did you not have uSD issues with your Stamp during testing?
No, but I almost never use the flash. For development I always just RAM boot from the PC.
Pro tip: You can just steal the MegaYume uppercode (which is a fairly functional file browser) , change the extension it looks for to .BIX and strip out the actual emulation, that would be a super quick and dirty graphical bootloader that works with all display types.
@Wuerfel_21 But, this SWaP module doesn't work with FatFS unless FSRW is run first...
I seem to recall a binary of something in the original Stamp thread where you were getting it to work with @knivd
Have to see if that one has same issue or not...
Found a quote from @ke4pjw that might be related to my uSD problem:
I see FSRW sending out a bunch of zeros, that might be the same as CMD0...
@Wuerfel_21 is "_mount" in FlexSpin undocumented? Looked around but don't see it...
Guess the real thing is in VFS code anyway, so maybe doesn't matter...
Yeah IDK where that one comes from, but the actual thing lives in the SDSPI driver, which is @evanh 's baby.
@Wuerfel_21 That reminds me... Downloaded the latest NeoYume and got it to work (with aforementioned FSRW hack). But, noticed that the 4-bit experimental uSD driver flag was set. Don't know if it really does anything, but commented that out and it worked...
Oh, is it on-by-default in the repo????
Is that what this means?
yes! Oh no!
EDIT: Fixed on github/sourcehut
@Wuerfel_21 trying to remember… is there a way to launch MegaYume into a particular rom and bypass the menu?
Yes. if you're using loadp2, you can just add something like
-a /sd/foobar/whatever.bin
to the end. This also works for MisoYume. For NeoYume you want to have just the game directory name, like-a mslug
. In that you can also override the BIOS selection with the second argument, like-a mslug japan
.To manually implement this, put
%"ARGv"
at $FC000, then the list of argument strings (zero-terminated). The list ends on an empty string (two consecutive zeroes).I.e. it'd look like
or
Though MegaYume/MisoYume don't actually check if the list is terminated currently.
Note that it's also possible to use this style of parameter passing with FlexC natively (i.e. getting the argc/argv passed into main).
One problem with this is that it doesn't work if the debugger has locked high memory.
Case #1 has some issues, but does look like it can generally work.
Need to improve holder for this SNES controller. Seems it is thicker in the back than in the front, missed that.
These square speakers work. They were same price as round ones, so giving them a try.
Still need to work in volume control though...
Also need to integrate them into the case
Added lipo battery power and charging using this thing:
https://www.sparkfun.com/sparkfun-lipo-charger-plus.html
Hacked it into the onboard USB-C connector.
But, seems forgot that USB devices won't work at 4.7 V (or whatever this is).
Seems controllers need actual 5.0 V to work
So, need to build or buy a boost converter.
Actually, something like this is what is needed:
https://www.sparkfun.com/sparkfun-lipo-charger-booster-5v-1a.html
If it's a 1:1 SNES clone, the attached OpenSCAD model might be of help. I searched that up for an idea earlier, don't remember where it came frome, hope there's a credit inside the file...
It's a lot easier now to make edits to a driver when using the new mounting API. Megayume is still configured for the old API. Required changes to use new mounting API in megayume_upper.spin2. Two steps ...