Repurposing a Super Expander (or 3K RAM)

Modding and Technical Issues

Moderator: Moderators

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: Repurposing a Super Expander (or 3K RAM)

Post by chysn »

eslapion wrote: Sun Dec 08, 2019 11:26 pm Both the VIC-1110 8k and VIC-1111 16k RAM expansions use the same PCB. However, on the VIC-1110, 4 2k x8 SRAM footprints are left empty. On one of these boards, I filled 3 of the empty footprints with 8k x8 SRAM ICs and networked the missing extra address lines accordingly. This turns the 8k RAM expansion into a 32k RAM expansion.
That looks awesome, thanks for sharing! I do have an 8K RAM cartridge, so a project using that is a possibility in the future.

You need to be careful with VICMon, if you're using an original ROM like I am. It has this cool bi-directional disassembly feature, but that feature looks at screen memory at $1E00. As soon as you add RAM to block 1, screen memory relocates and that feature breaks. The only way to expand BASIC RAM without breaking VICMon is to use the 3K area at $0400.

So the 3K expander PCB is ideal as a VICMon host. For me, especially, since as a kid I did pretty much all my programming with a 3K expander.
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
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Repurposing a Super Expander (or 3K RAM)

Post by eslapion »

chysn wrote: Mon Dec 09, 2019 6:14 am
eslapion wrote: Sun Dec 08, 2019 11:26 pm Both the VIC-1110 8k and VIC-1111 16k RAM expansions use the same PCB. However, on the VIC-1110, 4 2k x8 SRAM footprints are left empty. On one of these boards, I filled 3 of the empty footprints with 8k x8 SRAM ICs and networked the missing extra address lines accordingly. This turns the 8k RAM expansion into a 32k RAM expansion.
That looks awesome, thanks for sharing! I do have an 8K RAM cartridge, so a project using that is a possibility in the future.

You need to be careful with VICMon, if you're using an original ROM like I am. It has this cool bi-directional disassembly feature, but that feature looks at screen memory at $1E00. As soon as you add RAM to block 1, screen memory relocates and that feature breaks. The only way to expand BASIC RAM without breaking VICMon is to use the 3K area at $0400.

So the 3K expander PCB is ideal as a VICMon host. For me, especially, since as a kid I did pretty much all my programming with a 3K expander.
Well, using VICMON means you're probably going to go for machine language so to prevent screen relocation, you can simply disable expansion in BLK 1 ($2000-$3FFF) and keep the expansion in BLK 2, 3 and 5. Load up the BLK 5 version of VICMON and enjoy a full contiguous 16k of workspace for your projects in BLK 2 and BLK 3. That's how the Scott Adams games were made.

BTW, the Super Expander also takes advantage of extra RAM available in BLK 1 onwards.
Be normal.
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: Repurposing a Super Expander (or 3K RAM)

Post by chysn »

There's certainly a great deal to consider as I ponder my next projects! Thank you so much.
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
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: Repurposing a Super Expander (or 3K RAM)

Post by chysn »

I wanted to follow up with a note about this project, in case anyone else wants to try it.

See the attached VicMON session. When VICMon hits a BRK or RTS, it sets the TXTTAB pointer (start of BASIC program) to the start of zero page. This makes the VIC-20 quite crashy if you start LISTing or RUNing BASIC programs at this location.

So if I want to use BASIC again, I have to remember to set TXTTAB back to $401 with either POKEs in BASIC or

.:002B 01 04

in VicMON.

I don't know if VICMon normally behaves like this in the absence of the extra 3K RAM. My guess would be no. But I disassembled the code at the BRK interrupt vector and it does mess around with TXTTAB for some reason.

Anyway, if anyone does a similar project, and this isn't normal VICMon behavior, keep track of your BASIC vector!
Attachments
IMG_3518.jpg
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: Repurposing a Super Expander (or 3K RAM)

Post by Mike »

Sadly enough, this is known behaviour of VICMON. Upon entering the monitor, VICMON changes quite a lot of zeropage addresses vital to the BASIC interpreter, see the thread "VICMON's destroying BASIC!".

That happens regardless whether there is another RAM expansion present (like yours) or VICMON just operates on it own, and it is also unrelated to the screen scroll bugs that appear with bigger (>= +8K) RAM expansion.

Even though VICMON provides a so-called "virtual zero-page" with the E command, some zero page values are already changed before the user has the opportunity to issue said command. Especially, $2B/$2C is overwritten and needs to be restored manually, see the other thread.

This interoperability issue between VICMON and BASIC was one of the reasons I went with MINIMON instead - and there I took great care to minimize zero page usage.
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: Repurposing a Super Expander (or 3K RAM)

Post by chysn »

Mike wrote: Tue Dec 24, 2019 4:23 pm Sadly enough, this is known behaviour of VICMON.
Ah, thanks. I consider that good news. As long as my project didn't introduce something new, and there's a simple workaround, I'll be fine.
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: Repurposing a Super Expander (or 3K RAM)

Post by Mike »

Even if it had been some issue which only would have been triggered by operating a RAM expansion alongside VICMON, people would have encountered it already when using VICMON and a RAM expander together in a cartridge extender.

Anyhow, what we have thus far is not an exhaustive list of bugs in VICMON. There are also other issues:
  • you can make VICMON crash by repeatedly entering invalid assemble commands or invalid hex numbers *),
  • the New locator command in principle cannot handle immediate operands as part of addresses and thus only could do half of the job, and
  • the scrolling disassembly to lower addresses cannot be guaranteed to produce the correct result and sometimes mistakes operands for instructions or vice versa.
Regards the last bullet point (and this is strictly a matter of preference, I know): the scrolling behaviour of memory and disassembly dump itself annoys me more than it helps me. While working in the monitor, I often like to make room for edits on the lower half of the screen with cursor down movements. Half the time, VICMON would scroll in a dump I wouldn't want. :lol: In MINIMON, if I want a quick overview of a bigger amount of code, I simply disassemble a range and use CTRL to slow down the speed. That works for me. :)

Greetings,

Michael


*) In both these cases, data is being left on the CPU stack due to incorrect error processing, and this ultimately leads to a stack overflow. :(
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: Repurposing a Super Expander (or 3K RAM)

Post by chysn »

Six months later, I'm revisiting this project. I got another 3K RAM expander for eight bucks! I'm going to add the 2K SRAM at $A000 again. But this time, I'm going to add a low-profile socket to the Block 3 spot so I can test some 2716s and 2732s in Block 3, and a reset button. Meanwhile, I plan to take the VICMon ROM out of my original 3K cart and return it to its native board. During the development of my last game, I spent way too much time fighting against VICMon's prima donna-ism.

I'm also looking into burning 2716s and 2732s. It looks like a TL866II+ can burn the chips I want at the right voltages. I'm totally new to EPROM burning, so this will be fun.
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: Repurposing a Super Expander (or 3K RAM)

Post by Mike »

chysn wrote:Meanwhile, I plan to take the VICMon ROM out of my original 3K cart and return it to its native board.
Oh! :shock:
During the development of my last game, I spent way too much time fighting against VICMon's prima donna-ism.
Makes one contemplate buying up all physical copies of the VIC-1213 cartridge to replace its firmware ROM with something more suitable for daily use. :twisted: :wink:
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: Repurposing a Super Expander (or 3K RAM)

Post by chysn »

Mike wrote: Fri May 22, 2020 2:49 pm
chysn wrote:Meanwhile, I plan to take the VICMon ROM out of my original 3K cart and return it to its native board.
Oh! :shock:
I know what you're thinking. The good news is that I used very tiny solder joints, so it should be easier than the last time I moved it.
Mike wrote: Fri May 22, 2020 2:49 pm Makes one contemplate buying up all physical copies of the VIC-1213 cartridge to replace its firmware ROM with something more suitable for daily use. :twisted: :wink:
Yeah, poor VICMon! I don't think I'd do that, but I'll opportunistically buy as many VIC-1210s as I can find when I think they're underpriced. Ditto with Super Expanders. The problem with Super Expanders is that the market is flooded with them, but their prices are strangely in the stratosphere (they go on ebay for $80 USD and never leave). I got mine for $12 USD, and I think that's about right for how many there are around.

I'm taking cartridge work kind of slowly. I've got somebody burning some AMD 2716Bs for me. If those work, I'll get my own programmer and get more of those chips, because they only take 12.5V to program. But I'd also like to put games on 2764s. I've got so many questions about this stuff, that I just need to go from one step to the next, read data sheets, and try things out.
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: Repurposing a Super Expander (or 3K RAM)

Post by Mike »

chysn wrote:The problem with Super Expanders is that the market is flooded with them, but their prices are strangely in the stratosphere (they go on ebay for $80 USD and never leave). I got mine for $12 USD, and I think that's about right for how many there are around.
I just took a peek at current ebay listings to re-affirm that for myself. Makes me scratch my head. People seem to have too much money in their hands. Or the traders just put up that price tag just in case someone really buys that thing. I also got a SE cartridge for less than 10 €, two years ago.

If there really was a significant demand by people to buy SE to write new programs using it, we would see those programs pop up here in Denial. Thus far however, if anything, you see people asking how to get the SE ROM running when softloaded. But no follow-ups with new programs, probably for a good reason: there are better alternatives around. :wink:
I've got so many questions about this stuff, that I just need to go from one step to the next, read data sheets, and try things out.
A good overview of the VIC-20 schematic is also necessary. There are some pitfalls to be avoided when designing anything for the cartridge port that goes beyond a rather simple ROM expansion.
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: Repurposing a Super Expander (or 3K RAM)

Post by chysn »

I got my burned EPROMs today. I soldered the socket into the bottom space, set it up for Block 3, and installed the EPROM and... it worked! Well, three of the four chips worked. One had a broken pin right off the bat, which maybe I'll address some other time.

But, this answered a key question: Yes, the AMD 2716B works fine on a VIC-20. This is important because this chip can be programmed at 12.5V, which means that I can use like the only programmer that will work with a Mac. My wife keeps bugging me about what I want for Father's Day, and now I have an answer.

And also, as an aside... I'm a software developer by day. I lead a project that's used commercially by tens of thousands of people. But still--today--it delights me to no end to have achieved the childhood fantasy of having my work on cartridge! Twelve-year-old Jason, you're going to be okay. :D

Edit: I also socketed the 6116 that goes in Block 5 and installed that chip. It was not in good shape, physically. When it arrived a couple weeks ago, I didn't take it out of the packaging to inspect it. I did manage to get it into the socket, though, and it works fine. Everything fits comfortably into the cartridge case with the sockets. Next step is to mount a reset button in this cart.

Edit: I got VICMon back where it belongs, in a VIC-1213 cartridge, all by itself on its original PCB. I did socket the chip, though. I don't think I'll part with VICMon yet, as I collect VIC-20 carts, but it's fired from active duty.
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
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: Repurposing a Super Expander (or 3K RAM)

Post by chysn »

My programmer came a little early, so I've been burning EPROMs today. It works great! It's a TL866II+. It's kind of limited in that it can only go up to 18V, but it's pretty easy to find 2716s and 2732s that can be programmed at 12.5V.
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
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: Repurposing a Super Expander (or 3K RAM)

Post by chysn »

My VIC-1110 cartridge project is a qualified success. The plan was to put a 4K application into the slots that a VIC-1111 uses for 6116s. My application is 4K, so I used head -c and tail -c to make pair of 2K files. I burned each file onto a 2716 so I have a High 2K and a Low 2K. I stuck these into sockets I added to the lowest two slots on the PCB and started up my VIC.

My application works perfectly. It spans the two 2716s just fine, and functions as it's supposed to.

I said it's a "qualified success" because there's some unexpected weirdness. I'm going to struggle with it myself for a few days or a week. I'll bring it to the forum when I've either figured it out or given up. It's going to involve me looking at schematics. :D
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
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: Repurposing a Super Expander (or 3K RAM)

Post by chysn »

Now, I've got my 4K application on a 2732. When I plug the 2732 into the Block 3 socket, I only see the first 2K. Everything from $6800 - $6fff is invisible.

I think that this is because the A11 pin of a ROM chip is pin 18, while the A11 pin of the 2732 EPROM is pin 21. That would explain failure to access addresses with a high bit 11, like $6800.

It seems like pin 21 is unconnected on the 3K RAM PCB. Relying on both translucency and my meter, it seems to be isolated. So, I think that the solution here is to simply jump pin 18 to pin 21. Am I on the right track here?

I have a minor concern about the output enable pin, which is the 2732's pin 18. This will be pulled high at the high addresses, so my fix might not work unless I pull that pin low, which would involve diverting the PCB's line to pin 21 rather than simply jumping 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
Post Reply