Several newb questions

What is a Uzebox? How can I get one? Check here!
User avatar
danboid
Posts: 1936
Joined: Sun Jun 14, 2020 12:14 am

Several newb questions

Post by danboid »

Hi Uzeboxers!

I have almost zero electronics experience but I think it would be fun to hack together a retro style console so that's how I ended up here. It also seems like a fun way for me to learn C properly. I have several questions which I'm hoping the community would be kind enough to answer before I commit to building a Uzebox.

Uzebox is getting old now and there doesn't seem to have have been much activity in this forum over the last 5 years or so. Is there a newer, better open source (hardware and software) console in town now? The nearest alternatives I've found are the Bitbox (which is 32 bit but seems to be a dead project), Gameduino (slightly better spec, VGA output, pre-built but non open hardware design) and the Arduboy, which is a bit too underspec'd for my liking. Is there a valid successor to the Uzebox out there already or in the works?

The two things missing from the current Uzebox design that I'd like to see added on a future revision if possible are microUSB power and VGA or HDMI output. Are there any unofficial Uzebox schematics out there that add either or both of these features?

What about using a Atari/Commodore/SEGA joystick port instead? I'd personally rather use a Megadrive joypad with the Uzebox and I would've thought it might be a bit easier to source the Atari-style joystick ports vs SNES ones? Is there a fork of the design that has implemented this?

I've had a quick look through the current list of games and the ones that most impressed me are the Tempest 2000 clone, the Columns port and the Castlevania WIP. The Donkey Kong port looks cool too. Any other recommended games, apps or demos?

What is the maximum size SD card supported by the Uzebox? This should be mentioned in the FAQ.

I won't be building a Uzebox unless I can get the Hello World example to build under Linux. I only get as far as:

Code: Select all

avr-gcc  -mmcu=atmega644 -Wall -gdwarf-2 -std=gnu99 -ffunction-sections        -DF_CPU=28636360UL -Os -fsigned-char -MD -MP -MT uzeboxcore.o -MF dep/uzeboxcore.o.d  -c  kernel/uzeboxcore.c
kernel/uzeboxcore.c:42:13: error: variable ‘initPatches’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’
 const char *initPatches[] PROGMEM = {initPatch};
             ^
Makefile:63: recipe for target 'uzeboxcore.o' failed
make: *** [uzeboxcore.o] Error 1
This is using avr-gcc 5.4.0 under Ubuntu 18.04 and following the instructions on http://uzebox.org/forums/viewtopic.php?f=8&t=153&p=8042

Thanks!
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Several newb questions

Post by Artcfox »

Hi! Welcome to the Uzebox community.

I would say that things have really started to take off within the last 5 years for the Uzebox, we've gotten a completely new cycle-perfect emulator, CUzeBox, a brand new bootloader that supports both SDSC and SDHC cards, a ton of new video modes, an online version of the emulator that lets you select games from a list, a whole bunch of new games, the Uzebox DTV (built into a SNES controller), a Uzebox Portable, and probably other things that I've forgotten to mention.

If you'd like to get started, I put together a video tutorial series that will do just that. It will walk you through getting an entire development environment set up, show you how to use the tools, configure GIMP to generate the proper assets, etc: https://www.youtube.com/watch?v=vT2TUSZ ... l2vaeW5Dsk

The tools are mature enough that some people have made entire Uzebox games before having any actual hardware.

As long as you have a fast enough computer, you can check out all the games online here: http://www.nicksen782.net/UAM/APP_emu/emu.php

Definitely check out Flight of a Dragon (RC1). Bugz was the first game that I wrote, and I followed up with Laser Puzzle and Laser Puzzle II. Lately, I've been playing Tornado 2000, Alter Ego, Block Boy, Zooming Secretary, Ghosty Ghost, Megatris, and Joyrider, but there are a ton of other good ones.

If you want to wrap your head around how video mode 3 with scrolling works, I wrote the "Uzebox Mode 3 with Scrolling Guide": https://sites.google.com/site/artcfox/o ... blications

The Uzebox Portable has everything built-in (controller, screen, sound) and charges over microUSB, but at the end of the day, the Uzebox is powered by an 8-bit ATmega644 microcontroller, so it's not going to give you VGA or HDMI. There are people who have gotten other input devices working, but all of the games are compiled with SNES controller support, so you'd have to edit the source for games if you want them to use something else.

The maximum size SDHC card supported using the new bootloader (V.5.0.12) is 32 GB.

Edit: I'm running Debian 10 now, but the instructions in my video should work with Ubuntu 18.04 as well.
Edit 2: I forgot to mention the Games and Demos page: http://uzebox.org/wiki/Games_and_Demos
CunningFellow
Posts: 1445
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Several newb questions

Post by CunningFellow »

HDMI would be possible as there are ICs that could replace the AD723 and output 480i. However all the ones I have looked at are wafer scale packages so not at all soldering at home friendly.

I would recommend if you wanted to use an atari style joystick plug that you do a conversion to a serial protocol with some shift registers on board. That will mean your joystick will be 100% hardware compatible without having to recompile the games for your specific hardware.
User avatar
danboid
Posts: 1936
Joined: Sun Jun 14, 2020 12:14 am

Re: Several newb questions

Post by danboid »

Hi Arcticfox and Cunningfellow

Thanks for your quick replies!

It looks like I'll be basing my uzebox on the portable version if that has microUSB power then and I'll be sticking to using the SNES pads at first if no-one else has made one with Atari joystick ports.

The Linux Uzebox howto ( http://uzebox.org/forums/viewtopic.php?f=8&t=153&p=8042 ) hello world tutorial.c has bit rotted it seems because it includes "kernel/video.h" and "data/fonts.pic.inc" both of which no longer exist within the current uzebox source tree.

I had forgot to mention Flight of a dragon in the shortlist of most impressive games. I have seen a video of it and it looks great but after building the source it isn't running under uzem for me - I just get a load a garbled mess instead. It does work fine under the browser so not sure where I'm going wrong with that.

There seems to be a bug with uzem where it loads all the files in the current directory, whether they are uzebox data/binary files or not. Sometimes this prevents games loading.

I have also tried and failed to build columns. Was the source to the Castlevania port never released?
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Several newb questions

Post by Artcfox »

The portable is a lot more complicated to build than just the Uzebox from a kit. It looks like the normal kit form of the Uzebox is not available from Adafruit right now, but if you look here: http://belogic.com/uzebox/downloads.htm you should find all the design files and info you need to build either the kit or the portable.

I'm not sure what can be done about the old tutorials that no longer work, as I didn't post those tutorials, so I can't correct the information in them.

Uzem is the old emulator, and there have been some new video modes that only work on real hardware and in the new emulator, cuzebox, but not in the old emulator, uzem. You'll need to build and run cuzebox if you want to run those (including Flight of a Dragon) locally.

If you follow along with the first video guide I linked you, it will walk you step-by-step through compiling a bunch of games, and also how to compile and run cuzebox. The second video will walk you through a hello world tutorial, including how to use gconvert to create the include files for your tileset. I just followed those instructions on a fresh install, so they should work for you. Let me know if you run into any issues.

If you just want to get down to business and make sure you can compile things, the commands in the section below will install the prerequisites and then it will compile a bunch of games in the ~/uzebox/roms directory:

Code: Select all

sudo apt-get update
sudo apt-get install -y gcc-avr binutils-avr avr-libc avrdude g++ git libsdl2-dev
cd
git clone https://github.com/Uzebox/uzebox.git
cd uzebox
make
To build the cuzebox emulator (faster, slightly different feature set)

Code: Select all

cd tools
git clone https://github.com/Jubatian/cuzebox.git
cd cuzebox
make
To compile and run Bugz:

Code: Select all

cd ~/uzebox
mkdir MY_GAMES
cd MY_GAMES
git clone https://github.com/artcfox/bugz.git
cd bugz/default
sudo apt-get install xcftools
./scratch
To run Bugz under the cuzebox emulator:

Code: Select all

~/uzebox/tools/cuzebox/cuzebox ~/uzebox/MY_GAMES/bugz/default/bugz.uze
It doesn't look like the sources to the Castlevania WIP were released: http://uzebox.org/wiki/Castlevania:_Uzebox

Let me know if you have any more questions or run into any issues, I'm always happy to help!
User avatar
Jubatian
Posts: 1561
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Several newb questions

Post by Jubatian »

danboid wrote: Sun Jun 14, 2020 7:46 pm I had forgot to mention Flight of a dragon in the shortlist of most impressive games. I have seen a video of it and it looks great but after building the source it isn't running under uzem for me - I just get a load a garbled mess instead. It does work fine under the browser so not sure where I'm going wrong with that.
Hi Danboid, thank you! Glad you like it! For now please use the binaries here: https://github.com/Jubatian/foad/tree/master/_bin_ , what you experience isn't a problem of the old Uzebox emulator (it runs fine on it), rather apparently a problem introduced with a later version of GCC. So definitely a bug lurking somewhere which I will need to find (embarrassing as I generally do pretty well to ensure I don't have any C level programming defects which could be triggered by a compiler version change!). Another problem is that FoaD really stretches the ROM limits, it could be that somehow it is getting broken without a warning because some area just fails to compile within the size limit reserved for it.

Unfortunately I am pretty much inactive these days due to life issues, hope later I could pick things up once more, there are certainly quite some important things on my backlog!

Feel free to ask if you are interested in any of Uzebox's features, programming quirks and such, I could definitely spare a few minutes to give some help if you would like to start tinkering with it! ;)
User avatar
danboid
Posts: 1936
Joined: Sun Jun 14, 2020 12:14 am

Re: Several newb questions

Post by danboid »

I mistakenly said I was going to try to put together a UB portable but actually the only feature I really want from the portable is the microUSB power.

What I would actually like to create is a regular SCART UB but modified to use the same power circuitry as is used on the portable, so as to be able to use microUSB. I'm not really bothered about having a battery to make my breadboard portable. Might there be any issues with this?

Junbatian:

Yes, the foad binary in its gh repo works fine under cuzebox. How annoying re gcc!
User avatar
danboid
Posts: 1936
Joined: Sun Jun 14, 2020 12:14 am

Re: Several newb questions

Post by danboid »

Success!

I had already seen CB games getting built successfully under my Ubuntu install previously but that was only the ones within the CB repo.

I have now not only got bugz to build and run under cuzebox without issue but I've also successfully built and run block boy although block boy has graphical issues under both uzem and cuzebox.

I have tried to build Tornado 2000 but without much luck yet. Building Columns only gets as far as:

~/src/uzebox/MY_GAMES/uzebox-weber/Columns/default$ make
dep/uzeboxSoundEngineCore.o.d:1: *** multiple target patterns. Stop.
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Several newb questions

Post by Artcfox »

Awesome!

I remember experiencing graphical issues with Block Boy in the past when I tried building it myself. I think I had to hand-massage some of the autogenerated files (or make sure that I replaced them with ones from the repo). Other than the stuff in the demos folder, I don't think most people compile each others games that often, and sometimes people require manual steps after the automated ones in order to get it to work.

Another thing is people use every last byte of memory and codespace they can in the Uzebox, and it's likely that games written years ago and compiled with old compilers don't generate the same binaries they once did. We had that issue with some of the demos that broke when using a newer compiler to build them.

I'm glad your compiler is working for you now!

I've spent the past few days looking at hexdumps and reverse-engineering the songs and instruments for a Uzebox "game" where the source code has gone missing, but I am really looking forward to creating another puzzle game.
CunningFellow
Posts: 1445
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Several newb questions

Post by CunningFellow »

Danboid, You should be able to just run the Uzebox of the 5v from USB. The UzeDTV does this.

Do you have any plans for what game/games you would like to have a crack at?
Post Reply