My first Cartridge...

Modding and Technical Issues

Moderator: Moderators

Robbie
Vic 20 Dabbler
Posts: 84
Joined: Tue Aug 11, 2020 4:36 am
Location: England

My first Cartridge...

Post by Robbie »

Hello all.

Father Christmas has been, and I'm sitting here with:
- 27C64 Eprom
- UV Eprom eraser
- Eprom writer - TL866Ⅱ Plus
- TFW8B/Tynemouth Software 8k/16k cartridge PCB
- Wax4k download

Errrrrr.... help?
Untitled-1.jpg
Robbie thinking aloud:

I figured out to buy the low voltage Eproms, to work with the TL866 burner, so I worked something out on my own. The Eproms are 28 pin DIL, so seemingly right for the TFW8B board. The Eprom datasheet tells me it's 8K x 8bits, hence the 64 in the title. I've got low profile sockets, so it'll fit in a case, if we get that far.

I'm guessing (from the PCB silk screen) the 74LS00 is for 16kB, but have no idea what it does - (quad 2-input NAND gate). I know what NAND gates do, but their purpose for the cartridge PCB? Perhaps it's something to do with interpreting the jumpers on the board?

The PCB silk screen also seems to be telling me to solder a 0.1uF capacitor at the top of the Eprom.

The silk screen 8k / 16k seems to be a jumper for selecting what we're using - so I solder from the centre pin to to the 8K end?

The crosses at the bottom left seem to be to select where I want the cartridge in memory. I guess I just use the right one (marked 8K) and solder a link from the centre to one of the blocks as written on the back:
block 1: 2000-3FFF
block 2: 4000-5FFF
block 3: 6000-7FFF
block 5: A000-BFFF
Block 5 would seem the obvious choice? Is there any reason not to use that? I may want to use a memory expansion cartridge too, so I think I can use 3kB and 16kB without any problems, though I have a feeling 8kB uses A000-BFFF?

So, if I select block 5 then it's SYS40960 to start the s/w.

Then we have the A13, A14 and A15 jumpers at the top, which all seem to be set 5V for the 27C64.

For a 16kB Eprom, it seems to be pretty much the same process, though you need to tell it where to put the high and low 8kB blocks, and set the A13, A14 and A15 jumpers differently.

I think I might have figured it out, hardware-wise. Would anyone be so kind as to let me know where I've misunderstood (and what the 74LS00 is for).

To program the Eprom:
I'll stick it under the UV lamp for half an hour and have a tinker with the software that came with the Eprom writer...


(mod: topic moved to the Hardware section, at least what amounts to the OP. The follow ups are a bitter fit with the "Emulation & Crossdeveloping" section, as non-native tools are mainly involved, so there ...)
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: My first Cartridge...

Post by chysn »

You've got pretty much the same setup that I use for wAx cartridges, down to the TL866II+.

I use 0-ohm SMT resistors for the jumpers, but you can also just use blobs of solder, which is what TFW8B does when they make cartridges. It just doesn't look as nice. :D

You'll definitely need the capacitor to stabilize the RAM. You won't need the 74LS00 for the 8K configuration. The way I understand it, it allows the data lines to be switched between two different 8K addressing spaces.
- Wax4k download
Keep in mind that your minipro software will complain if you try to burn the 4K wAx image onto a 2764. You'll need to pad it out to 8192 bytes. For the wAx cartridge, I use this space for the API jump table ($7000 to $7023), the M.I.T. license text, and a half-dozen plug-ins. This is what you'll get when your cartridge arrives. I didn't include this 8K binary in the git repo, and my personal MacBook Pro is currently offline, so I don't have easy access to it. So for now, you'll have to pad the 4K image with something else. If you need advice on how to do that (for Mac or Linux), let me know. The easiest way is just to pipe two copies of the 4K binary to a single file.
Block 5 would seem the obvious choice? Is there any reason not to use that? I may want to use a memory expansion cartridge too, so I think I can use 3kB and 16kB without any problems, though I have a feeling 8kB uses A000-BFFF?
The 4K wAx image that you have is assembled for Block 3 ($6000). If you do want wAx in block 5, you'll have to re-assemble it with XA, having set * = $a000 on line 40.
Then we have the A13, A14 and A15 jumpers at the top, which all seem to be set 5V for the 27C64.
I just got a VIC Nibbler cartridge, which has a 2764, and only the A14 jumper is 5V. I'm not sure what's up with that, but I plan to experiment soon.
Last edited by chysn on Sat Sep 12, 2020 2:43 pm, edited 1 time in total.
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5

WIP: MIDIcast BASIC extension

he/him/his
Robbie
Vic 20 Dabbler
Posts: 84
Joined: Tue Aug 11, 2020 4:36 am
Location: England

Re: My first Cartridge...

Post by Robbie »

I'm glad you got up and logged in early, chysn!

I didn't know there was such a think as a 0-Ohm resister, SMD or otherwise, but I suspect with my sausage-fingers I might be better just blobbing solder - SMD components tend to end up in my hair, up my nose and soldered to my watch! Looking nice isn't synonymous with Robbie and surface-mount!

Thanks for the heads-up on Block 3. I'll use that, which will still leave me space for the 16kB RAM in blocks 1 and 2. That's default for the Vic-1111 I think - if not, I've got a switchable expansion somewhere.

I've got the Eprom in position now, and XGpro v10.35 ready to go... hold on to your hats!

(mind you, it's Mrs Robbie's birthday so there will be attention required very soon... Ladies don't seem to consider a burned Eprom to be a satisfactory achievement when there's Going Out For Lunch to be had!)
Robbie
Vic 20 Dabbler
Posts: 84
Joined: Tue Aug 11, 2020 4:36 am
Location: England

Re: My first Cartridge...

Post by Robbie »

Surely it can't be that easy!

I selected NMC27C64Q as the IC,
clicked 'LOAD' and selected 'Wax4k'
clicked 'PROG' with no padding, so $1020 - $1FFF is set to the default of $FF

Done!

If I restart XGpro and read the Eprom then it's giving me what I expect to see, so I'm not dreaming.

I'll leave the soldering until we've been to the Garden Centre, but fingers crossed...
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: My first Cartridge...

Post by chysn »

Robbie wrote: Wed Sep 09, 2020 7:34 am Surely it can't be that easy!

I selected NMC27C64Q as the IC,
clicked 'LOAD' and selected 'Wax4k'
clicked 'PROG' with no padding, so $1020 - $1FFF is set to the default of $FF

Done!
Cool! The Mac software is an open-source command-line utility made by somebody else, so it doesn't have the bells and whistles (apparently, like automatic padding) that the Windows application does.
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5

WIP: MIDIcast BASIC extension

he/him/his
Robbie
Vic 20 Dabbler
Posts: 84
Joined: Tue Aug 11, 2020 4:36 am
Location: England

Re: My first Cartridge...

Post by Robbie »

No complaints about XGPro... yet... we'll see if it's worked. When you open the software it's just got $FF written to every address, ready to go.

So if I create a little 'Hello World' program on my Vic, and save it to my SD card, I guess it'll be a .prg file.
I'm assuming that's no good for burning to the Eprom, and that I'll somehow need to create a memory dump.

Is that something I can do from Wax in a format that XGPro can burn?
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: My first Cartridge...

Post by chysn »

Is that something I can do from Wax in a format that XGPro can burn?
wAx's > tool writes .prg files. The format conversion is something you'd do on your PC. The only difference between a standalone image suitable for burning to EPROM and a .prg file is that the .prg file has a two-byte header at the very beginning, indicating where the program should go in memory (low byte/high byte). So it's just a matter of getting rid of that header.

For Mac/Linux, you'd use tail for that. If you've got, say, a 300-byte .prg file, you want to put the last 298 bytes of that file into another file. So

Code: Select all

tail -c298 hello.prg > hello.bin
It doesn't look like there's a built-in Windows equivalent of tail, but my Windows-fu is non-existent, and I'm sure there's something out there.

For completeness (or at least symmetry): To add a header, and turn a binary file into a .prg file, you can do this in Mac/Linux, with 00 and a0 being the header:

Code: Select all

printf "\x00\xa0" | cat - hello.bin > hello.prg
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5

WIP: MIDIcast BASIC extension

he/him/his
Robbie
Vic 20 Dabbler
Posts: 84
Joined: Tue Aug 11, 2020 4:36 am
Location: England

Re: My first Cartridge...

Post by Robbie »

No joy with my first attempt of running the cartridge.
I knew it was too good to be true. :(

However, I've just had a look at the Wax4k file, and the first two bytes are 0060.

From what you said, that suggests I've burned the .prg version - it's the block 3 memory address. I've tried running it as a .prg from an SD card, but it's not having it.

I'll try removing those first two bytes and see if it works.
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: My first Cartridge...

Post by chysn »

Robbie wrote: Wed Sep 09, 2020 11:25 am I'll try removing those first two bytes and see if it works.
Yes, it'll work if you remove the first two bytes.
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5

WIP: MIDIcast BASIC extension

he/him/his
Robbie
Vic 20 Dabbler
Posts: 84
Joined: Tue Aug 11, 2020 4:36 am
Location: England

Re: My first Cartridge...

Post by Robbie »

SYS24578 should work too? Ah, it won't cos you've coded Wax to work at 24576.

I've just peeked a few addresses and it looks like the cartridge is showing up ok.

I shall reflash the Eprom and we should be there.
Robbie
Vic 20 Dabbler
Posts: 84
Joined: Tue Aug 11, 2020 4:36 am
Location: England

Re: My first Cartridge...

Post by Robbie »

Woo-hoo! :D
Untitled-1.jpg
For my own benefit:
- The silk screen on the TFW8B/Tynemouth Software PCB tells you all you need to know
- The first two bytes of a .prg are the memory location. Remove them and you have a cartridgeable file

It really isn't hard or expensive at all!

Thanks for your help chysn.
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: My first Cartridge...

Post by chysn »

Sure thing! It's a lot of fun, isn't it?
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5

WIP: MIDIcast BASIC extension

he/him/his
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: My first Cartridge...

Post by Mike »

VICE allows to attach *.bin files without load address at the standard positions $6000, $A000, etc. as cartridge. It's a good idea to test a cartridge image this way in VICE before burning it into EPROM. Especially you can then PEEK memory locations in a dry run, so you see what to expect once you do the real hardware.
User avatar
Noizer
Vic 20 Devotee
Posts: 297
Joined: Tue May 15, 2018 12:00 pm
Location: Europa

Re: My first Cartridge...

Post by Noizer »

Robbie wrote: Wed Sep 09, 2020 1:11 pm Woo-hoo! :D ...
Congratulations! Good work. Instead I would prefer the solution with SMART RAM + MINIMON2020 (@Location $9800), so that all of the "standard" RAM is available, in total 35K.
viewtopic.php?f=3&t=9802
The solution that you made for yourself, after all, sacrifices one of the standard memory area for driving the wAx assembler, at least 4 KB.
Valid rule today as earlier: 1 Byte = 8 Bits
-._/classes instead of masses\_.-
Robbie
Vic 20 Dabbler
Posts: 84
Joined: Tue Aug 11, 2020 4:36 am
Location: England

Re: My first Cartridge...

Post by Robbie »

SmartRAM looks great, but please can you tell me more about Minimon...
Post Reply