PucMon

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
alastair
Posts: 68
Joined: 10 Oct 2019, 14:28

Re: PucMon

Post by alastair »

I have the same programmer for my project. I started with the Windows software and entered machine code programs directly in hex! That was pretty painful, so I developed some automated tools. I have a build script that runs on my MacBook and calls minipro to burn the ROM image. The specific command is:

Code: Select all

echo "Burn ROM"
minipro -p "SST39SF020A" -w "build/output/rom.hex" -f ihex
My build script compiles the ROM image as an Intel Hex file (ihex) and puts in the `build/output` directory. The chip I'm using is a 256k byte NOR flash (SST39SF020A). You'll have ot figure out the correct name for your ROM. The programmer is very picky, but it's not going to blow anything up if you get it wrong. You just have to do some trial and error.
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: PucMon

Post by at67 »

The SST39SF020A is a great device and seems to be readily available, I used two SST39SF010A's in my ROM switcher here: https://forum.gigatron.io/viewtopic.php?f=4&t=34

If you're going to be constantly updating/changing the ROM, (like Alastair is), then using a Flash EEPROM like the SST39SF020A will make your life much less tedious, as it saves a lot of time in not having to constantly UV erase EPROM's. Be aware that in general FLASH EEPROM devices like the SST39SF020A are not pin compatible with EPROM devices like the 27C1024, you would need to build an adapter or PCB.

Of course if you are constantly programming ROM's, then you probably want to replace the EPROM socket with a ZIF socket, (better yet plug a ZIF socket into the EPROM socket), so that it's physically much easier to replace the ROM's.

But then of course the case lid will no longer fit...it's a bit of a rabbit hole and is what caused me to build my own ROM switcher.

You could also go even further like Gesari did here: https://forum.gigatron.io/viewtopic.php?f=4&t=112

Something I eventually want to get around to is designing a good looking and functional cartridge port that allows completely different/new Native games/applications/languages/OS's to be used with just a simple cartridge swap; but that's definitely long term.
walter
Site Admin
Posts: 160
Joined: 13 May 2018, 08:00

Re: PucMon

Post by walter »

The TL866A is probably the way to go indeed. It has command line tools for Linux, BSD, macOS.

Buying a new EPROM is not mandatory, you can wipe the existing one and reprogram it.

We've included a UV-erasable EPROM because I think that is much more retro than an electrically erasable EPROM, but of course these can be used as well if wired properly.
delpozzo
Posts: 38
Joined: 03 Jun 2020, 18:47

Re: PucMon

Post by delpozzo »

Thank you klf, at67, alastair, and walter for your guidance! Your responses made me feel a lot more confident about ordering the proper parts. I ended up going with the TL866II, a UV eraser (it was around $20, hopefully it will suffice), a ZIF socket, and a handful of extra EPROMS for keeping different ROM versions on deck. I probably won't be switching ROMS too often, but I definitely like having the option as that may change in the future. I really like the idea about a cartridge port for the gigatron, that would be really cool and something I'd be interested in for sure!
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: PucMon

Post by at67 »

I had a re-think about how I was drawing the ghosts and managed to save around 1500 bytes by drawing the ghosts skirts as an extra 12x1 sprite draw call, (effectively 9x1 with overlap), instead of the 12x9 whole sprite frame switch I was doing previously.

This has allowed me to add the sound effects into the ROMv3 version and make the ROMv5a a little smoother. The ROMv3 version runs substantially slower than the ROMv5a version, (you can hear it in the sound effects if you pay attention), but not really enough to affect game-play.

Both files are attached.

ROMv3 or higher.
PucMon.gt1
(13.96 KiB) Downloaded 237 times
ROMv5a and DEVROM
PucMon_ROMv5a.gt1
(13.01 KiB) Downloaded 187 times
delpozzo
Posts: 38
Joined: 03 Jun 2020, 18:47

Re: PucMon

Post by delpozzo »

I had a re-think about how I was drawing the ghosts and managed to save around 1500 bytes by drawing the ghosts skirts as an extra 12x1 sprite draw call, (effectively 9x1 with overlap), instead of the 12x9 whole sprite frame switch I was doing previously.
Very clever! It worked well on my Gigatron (ROMv4). The slight delay was there, but not very noticeable.

On a somewhat related note, my EPROM eraser and extra M27C1024 chips both arrived today by mail and I was able to upgrade to ROMv5a.

I had originally bought a cheap EPROM eraser on Amazon but the bulb didn't work. I returned it and got a used Ultralite Production EPROM Eraser on eBay which works just fine. I kept the original ROMv4 EPROM and programmed a couple of the new M27C1024s with ROMv5a-- one for my Gigatron and one to test the UV eraser. Minipro for Linux worked great with the TL866II Plus, here is the command I used for the M27C1024 if anyone is interested:

Code: Select all

./minipro -p "M27C1024@DIP40" -w ../gigatron-rom-master/ROMv5a.rom
The first thing I tried after upgrading to 5a was loading PucMon_ROMv5a.gt1 for an almost side-by-side comparison. It definitely runs a lot smoother, pretty much flawless from what I observed. CALLI ftw :-)

IMG_0493.jpg
IMG_0493.jpg (2.46 MiB) Viewed 5251 times
IMG_0495.jpg
IMG_0495.jpg (2.29 MiB) Viewed 5251 times
RetroCode
Posts: 17
Joined: 13 Jun 2020, 10:33

Re: PucMon

Post by RetroCode »

Interesting thread - not only a fantastic looking game, but a ROM upgrade. Hopefully something that might help pathe my way through a similar process... sometime in the not too distant future (I hope). Great work everyone!
walter
Site Admin
Posts: 160
Joined: 13 May 2018, 08:00

Re: PucMon

Post by walter »

I've made a PucMon-only ROM and put it online with the emulator: https://gigatron.io/emu-pucmon/
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: PucMon

Post by at67 »

delpozzo wrote: 02 Jul 2020, 19:43 The slight delay was there, but not very noticeable.

The first thing I tried after upgrading to 5a was loading PucMon_ROMv5a.gt1 for an almost side-by-side comparison. It definitely runs a lot smoother, pretty much flawless from what I observed. CALLI ftw :-)
If you put them side by side or play them straight after each other, (as you noted), the discrepancies are pretty obvious. But the ROMv3 still plays a decent game, so I am pretty happy with the way it turned out.

CALLI is an amazing addition to the ROM, it really makes cross compiled code to the Gigatron significantly more efficient; especially as you approach it's memory fragmentation limitations.
delpozzo wrote: 02 Jul 2020, 19:43 On a somewhat related note, my EPROM eraser and extra M27C1024 chips both arrived today by mail and I was able to upgrade to ROMv5a.
Good stuff, let the hacking commence in earnest!
RetroCode wrote: 02 Jul 2020, 20:41 Hopefully something that might help pathe my way through a similar process... sometime in the not too distant future (I hope). Great work everyone!
Once you can upload code and swap ROM's on your Gigatron, it really opens up a plethora of possibilities.
walter wrote: 03 Jul 2020, 12:45 I've made a PucMon-only ROM and put it online with the emulator: https://gigatron.io/emu-pucmon/
Very cool!
steve
Posts: 40
Joined: 08 Jul 2019, 19:40

Re: PucMon

Post by steve »

Dear "at67", you really - really - did a GREAT work: I've seen the emulator, then the basic compiler and ... this application that I think is the nicest one so far on Gigatron!!!

Regarding the implementation I've seen you've followed some nice guide for the AI, anyway if you didn't see there is also a nice video on it: https://www.youtube.com/watch?v=ataGotQ7ir8&t=943s

I've noticed anyway a little strange behaviour for ghost: when you hit them and they return in the cage they are still blue/scared, while I think normally they would be in their normal non-scared state.

Keep up and happy hacking!!!
Post Reply