Doom

AncientJames

  • Jr. Member
  • **
    • Posts: 9
    • View Profile
My port of Doom for the Thumby is now available on github.



Installing it is a bit of an adventure, and it will overwrite the firmware & games on your device. There are two files in Releases that need to be installed; the game itself is a .uf2 file, but the data needs to be installed using picotool.

The port is based on RP2040 doom, but modifies it to work with the Thumby screen.



TinyCircuits

  • Administrator
  • Hero Member
  • *****
    • Posts: 108
    • View Profile
    • TinyCircuits Homepage
This is absolutely amazing!  Great work!!!!

Ken Burns
TinyCircuits



AncientJames

  • Jr. Member
  • **
    • Posts: 9
    • View Profile
I updated the release so it's now a single install file.

Put the Thumby in BOOTSEL mode and copy thumby-doom.uf2 to it.
 


henryg

  • Jr. Member
  • **
    • Posts: 7
    • View Profile
I just got a thumby to put doom on, and am having trouble. I tried using the most recent one file release, and when turning it on, I get nothing on the display. I tried the older release and got the same thing, both with and without the whx file (tested without just in case I messed something up with loading that file). I then saw the note about setting FRAME_PERIOD, and so set that to 6400 (and PARK_LINES to 2), compiled it, and tried loading it onto my thumby, again with no change on the screen when turning it on. I have 2 thumbys and I am getting the same result on both. I can go into bootsel and load the factory firmware and get them working again with that.

Unfortunately I don't really know where to start with troubleshooting this, so was hoping you might have some ideas, or at least get something to display on the screen. Thank you!



AncientJames

  • Jr. Member
  • **
    • Posts: 9
    • View Profile
I'm surprised you're getting a blank screen - I would expect at least some flickery image.
One thing to try would be to go back to the thumby firmware, then load ugrey.mpy and greytest.py on it from https://github.com/AncientJames/uGrey - if you run greytest.py, that should establish whether it's some incompatibility with the greyscale driver. It's also a more convenient way to try out different refresh rates, rather than recompiling Doom each time.


henryg

  • Jr. Member
  • **
    • Posts: 7
    • View Profile
First, thanks for helping me out.

Ok, well I am having trouble getting that running as well, so that might be part of it. When running greytest on the thumby, it just looks like it restarts and reloads the main menu. Same thing happens when using the sample code in the readme for ugrey .

Trying it in the emulator on https://code.thumby.us/, doesn't seem to work either. After figuring out i needed to mark /lib/ugrey.mpy as emulatable, it seems to run without error (including not exiting), but nothing appears on the emulated screen. Also, adding print statements doesn't seem to work, even the simple program below doesn't print anything to the console and the program doesn't exit. Even if I put invalid code below 'import ugrey' it doesn't seem to be evaluated and give an error

import sys
import ugrey
print ('hello world')
sys.exit()

The version info I can find is MicroPython v1.19.1 on 2022-06-18

I did try https://github.com/TinyCircuits/TinyCircuits-Thumby-Games/tree/master/Fireplace and could calibrate the greyscale in that program (but I know it is using a different driver).


AncientJames

  • Jr. Member
  • **
    • Posts: 9
    • View Profile
It's promising that the fireplace works. One could presumably copy the timings from that, and I'll add some configuration options if I do another update. It's a tough one to fix without access to the specific hardware though.


henryg

  • Jr. Member
  • **
    • Posts: 7
    • View Profile
After messing with it more, I got greytest to work (I didn't have the folder it was in named 'greytest'). This is making me hope I did something equally stupid getting Doom running. With greytest, I got noticable desync lines at 5500, but was still able to see the image. I still need to figure out the best frequency, but around 6100 seems to be it for me. But this makes me wonder why I am getting no image at all for doom. Is there a place I should start poking to see if I can just get a splash screen or something after flashing uf2 image?

Again, I'm really hoping I am simply missing something, but I am just booting into  BOOTSEL and copying the uf2 file to the drive that pops up. When it is done copying, I unplug and restart the thumby and get no image.

Thank you again!


AncientJames

  • Jr. Member
  • **
    • Posts: 9
    • View Profile
It should just be a matter of copying the single installer uf2 to the RP2 drive. I've just tried it on a second thumby, and it worked OK.

It might be worth trying the previous release, copying the .whx file separately. Looking at the instructions I gave on the release page from that, I see there's a typo - there's a period at the end of the line that shouldn't be there. (Clutching at straws, but it's worth a shot)

It does seem that the display is a red herring. Doing nothing at all on boot would be a symptom of not finding the data file. (And of many other possible problems)

There's no debug out from the build I made. It might be worth rebuilding it to make beeps at various points, to try to track down where it's stopping.


htmlgames

  • Jr. Member
  • **
    • Posts: 7
    • View Profile
This project is amazing fitting this into such a small memory for what doom wads need (I read the breakdown too).
So basically, I remove all files in the folder and replace with your single file and 'reboot' to run ?

Edit: fyi I get the black screen of doom too.

fireplace demo works ok ,will have to try 'old' way
« Last Edit: January 29, 2024, 03:48:04 PM by htmlgames »


htmlgames

  • Jr. Member
  • **
    • Posts: 7
    • View Profile
Possibly the uf2 file download from git is the wrong size 4029 v 4096 not sure if uf2 file format needs to be byte aligned?

Edit: using win11

INFO_UF2.TXT

UF2 Bootloader v3.0
Model: Raspberry Pi RP2
Board-ID: RPI-RP2

Edit2: tried also in Linux bash term - same as win11.


I'm allowing a minute or two for the boot loader to flash, for the stock firmware that's working fine.

final mention that the thumby web ui shows 1.4mb as total memory available, thought we got 2mb ?
« Last Edit: January 29, 2024, 05:07:27 PM by htmlgames »


AncientJames

  • Jr. Member
  • **
    • Posts: 9
    • View Profile
I've built a version which puts the doom logo on screen for 2 seconds immediately on start, using conservative timings and no greyscale tricks. This might help establish where the problem is.
The uf2 file is attached here. It doesn't contain the whx data, but if you upload the 'single install' release first then this file, it should retain the data.





henryg

  • Jr. Member
  • **
    • Posts: 7
    • View Profile
I got the splash image!!! The screen just went black after, but it at least got that far.


AncientJames

  • Jr. Member
  • **
    • Posts: 9
    • View Profile
OK, try this one and see how far it gets.


 

SMF spam blocked by CleanTalk