Main uzebox repo broken and unmaintained

Discuss general Uzebox topics here: features, wish list. nice to have, etc.
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Main uzebox repo broken and unmaintained

Post by Artcfox »

I fixed the compile error in uzem when using GCC 12, and pushed it to the main repo.

I also verified that uzem compiles and runs properly when built with GCC 12, but it doesn't look like avr-gdb is available on Manjaro ARM, so I tested the remote debugging support using the version of avr-gcc on Debian 11.

If you want to try out remote debugging yourself, here is what I did to get the repo and dependencies installed (note you need to install gdb-avr):

Code: Select all

sudo apt install gcc-avr binutils-avr avr-libc avrdude g++ git libsdl2-dev gdb-avr

git clone https://github.com/Uzebox/uzebox.git
cd uzebox
make
mkdir MY_GAMES
cd MY_GAMES
git clone https://github.com/artcfox/circuit
cd circuit/default
./scratch
That should get you a fully built Uzebox repo, along with a fully built Circuit Puzzle game.

Then in a new Terminal run:

Code: Select all

cd uzebox
./bin/uzem --gdbserver -d MY_GAMES/circuit/default/circuit.uze
This will start the game in the emulator, but it will be paused with the GUI frozen waiting for you to connect to it with avr-gdb (You did `sudo apt install gdb-avr` above, right?)

To connect to it and start debugging, in another new terminal run:

Code: Select all

cd uzebox/MY_GAMES/circuit
avr-gdb default/circuit.elf
Once avr-gdb is running, you'll need to tell it to connect to the remote host (which is actually the localhost):

Code: Select all

target remote localhost:1284
And then you can set breakpoints, list the code, show a backtrace, like normal. You don't have to use the command line gdb, you can use emacs, or whatever IDE you want, as long as you configure it to use the avr-gdb client pointing to your .elf file, and configure the remote target and port properly.

Code: Select all

GNU gdb (GDB) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=avr".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from default/circuit.elf...
(gdb) target remote localhost:1284
Remote debugging using localhost:1284
0x00000000 in __vectors ()
(gdb) l
4914      }
4915
4916      ClearVram();
4917      SetTileTable(tileset);
4918
4919      SetUserRamTilesCount(GAME_USER_RAM_TILES_COUNT);
4920      StopSong();
4921      InitMusicPlayer(patches);
4922      StartSong(midisong);
4923      StopSong();
(gdb) b InitMusicPlayer
Breakpoint 1 at 0xa45a: file ../../../kernel/uzeboxSoundEngine.c, line 295.
(gdb) c
Continuing.

Breakpoint 1, InitMusicPlayer (patchPointersParam=0x803432) at ../../../kernel/uzeboxSoundEngine.c:295
295             patchPointers=patchPointersParam;
(gdb) l
290
291     const Patch *patchPointers;
292
293     void InitMusicPlayer(const Patch *patchPointersParam){
294
295             patchPointers=patchPointersParam;
296
297             masterVolume=DEFAULT_MASTER_VOL;
298
299     #if MIDI_IN == ENABLED
(gdb) bt

You are welcome to use cuzebox and/or uzem, but I don't see cuzebox being a total replacement for uzem, since uzem is still useful for the built in whisper port support (for printing stuff to the console, rather than displaying single numbers at a time as cuzebox does), and for its remote debugging capabilities.
User avatar
danboid
Posts: 1935
Joined: Sun Jun 14, 2020 12:14 am

Re: Main uzebox repo broken and unmaintained

Post by danboid »

Thanks for fixing Uzem and the UB repo build Artcfox!
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Main uzebox repo broken and unmaintained

Post by Artcfox »

No problem, I'm glad I could help. :)
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Main uzebox repo broken and unmaintained

Post by Artcfox »

Tonight I cleaned up all of the warnings for all of the tools in the Uzebox repo. There are still some warnings when compiling some of the included roms with avr-gcc, but I'm less concerned about those. This is something that should have probably been done a long time ago!

I tested with GCC 8.3.0 (x86_64) and GCC 12.1.0 (aarch64).
User avatar
danboid
Posts: 1935
Joined: Sun Jun 14, 2020 12:14 am

Re: Main uzebox repo broken and unmaintained

Post by danboid »

That's great Artcfox! Thanks!

You say Uzem should remain for its remote debugging support then because the whisper console that you added to cuzebox works much better than Uzem because it updates/prints output every second or so whilst your game is running so you get near realtime debug output whereas uzem only prints the whisper console output when you quit the emulator so it is of a much more limited use. Could you adjust the uzem whisper console to work more like the cuzebox one without too much effort?

Have you tried Starduino yet Artcfox? I think its the most impressive 8 bit game I've ever seen. There's probably not that much of a game there tbh but what has been achieved here technically can't be denied. If we put a bit of effort into promoting it, like on the the main Uzebox site for a start, we might get some more interest in the platform. I tried to get IndieRetroNews to cover it but they didn't. I don't use reddit but I bet there are a few gaming reddits channels etc who'd be interested in the peak of 8-bit achievement!

EDIT

I've just checked the Starduino thread and see that you've responded to it since I last checked. A suitably amazed response too! I don't suppose you're a fan of Palace software's Barbarian are you?
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Main uzebox repo broken and unmaintained

Post by Artcfox »

I don't have any weird issues with the Uzem whisper console. Are you printing '\n' after each line? That might flush the buffer if it is line-oriented.

The Starduino port is really awesome. I hadn't heard of Barbarian until you mentioned it. I had an Apple //e from the mid 80's up until 1997, and then we got a Pentium 2, so I missed a lot of the old classics.
User avatar
danboid
Posts: 1935
Joined: Sun Jun 14, 2020 12:14 am

Re: Main uzebox repo broken and unmaintained

Post by danboid »

Yes, IIe to the P2 is a massive leap! After my C64 I had a few Amigas, a 386 DX and a couple of 486s before I got a Pentium something.

Apple IIe's were pretty rare in the UK, Apple wasn't much of a big deal in the UK until the Mac appeared.
Post Reply