Yoruk Posted May 10, 2020 Share Posted May 10, 2020 (edited) Hello there, I am learning assembly language, and I was looking for a way to try programs on my physical VIC20. I love designing boards, so I was lookng for a way to create a simple board for the expansion port with a couples of eproms. I'm not sure to fully understand the memory map. Where can I put like, 8kb of ROM ? On any of the blocks 1 to 3 ? $2000-$3FFF: 8 KB, Expansion Block 1, accessed by BLK1 line $4000-$5FFF: 8 KB, Expansion Block 2, accessed by BLK2 line $6000-$7FFF: 8 KB, Expansion Block 3, accessed by BLK3 line And so I'll just need to use /BLK1 to enable my chips ? I also don't get how the read and write signals on the port are working... 17 V R/W VIC Read - /Write high during read cycle, low during write cycle of the VIC 18 C R/W CPU Read - /Write high during read cycle, low during write cycle of the CPU What is exactly the "read" signal that I should to enable my eproms ? I don't get the difference between these two signals (VIC and CPUà ? Thanks ! Edited May 10, 2020 by Yoruk grammar again Quote Link to comment Share on other sites More sharing options...
carlsson Posted May 11, 2020 Share Posted May 11, 2020 Primarily you want to map your 8K ROM onto BLK5 ($A000) which is the one that autostarts. The other three are meant for RAM expansion but can be used for ROM as well, though you would have to SYS to start your games then. As far as I can tell, V R/W is a misnomer, there is no way for the VIC chip to access the cartridge. I don't know the technical details, but I think you should aim at C R/W only. Quote Link to comment Share on other sites More sharing options...
Yoruk Posted May 12, 2020 Author Share Posted May 12, 2020 Thanks for this feedback. Great to know that $A000 is an autostart address, it could be very useful. Maybe game cartridges are using this bank too ? Thanks for the explanations about the the read signals, I'll dig into this. Maybe I can put a scope probe on these pins to see the signal... Quote Link to comment Share on other sites More sharing options...
carlsson Posted May 12, 2020 Share Posted May 12, 2020 Yes, all games except for the Scott Adams' text adventures are based on block 5, plus usually block 3 for 16K games (a few use blocks 1+5). Without looking for it, I feel there should be documents and discussions online to do exactly what you are asking about, or at least blueprints of typical cartridge PCBs for you to follow. I have a few that take 2 * 4K that I could scan and trace if you have absolutely nothing else. Quote Link to comment Share on other sites More sharing options...
Yoruk Posted May 13, 2020 Author Share Posted May 13, 2020 Well I found here the schematics of a "text interface" that As we can see the "V R/W" signal is NC and the "C R/W" is driving the "/WE" pin of a 2016 (static ram ?). But I don't understand how the /OE signal of the top 2716 chip is created... The input gate D of the U4 7405 (pin 9) is connected to... nothing ? 10 hours ago, carlsson said: I have a few that take 2 * 4K that I could scan and trace if you have absolutely nothing else. Well I can be interested by some scans... I have some time now and I like retro-analyze PCBs so... It could be helpful ! Thanks. Quote Link to comment Share on other sites More sharing options...
carlsson Posted May 13, 2020 Share Posted May 13, 2020 I realized the cell phone camera is better suited at taking closeups of circuit boards than putting it in the scanner. This board is wired to take two 2532 chips (or 2332 ROM, I assume) for a total of 8K going into $A000. Quote Link to comment Share on other sites More sharing options...
Yoruk Posted May 13, 2020 Author Share Posted May 13, 2020 Thanks ! I'll study this. Quote Link to comment Share on other sites More sharing options...
carlsson Posted May 13, 2020 Share Posted May 13, 2020 Some more links unless you already visited them: 8/16K ROM cartridge: http://blog.tynemouthsoftware.co.uk/2019/02/vic20-8k-or-16k-rom-cartridge-pcbs.html 35K RAM cartridge: https://blog.gjmccarthy.co.uk/commodore-vic-20-expansion/ Actually TFW8B has lowered the 8/16K ROM PCB from £9.99 to £3.00. I don't know how cheap you can make your own cartridge boards, but £3 + shipping from the UK isn't too bad if you can save hours of work, depending on how many you were planning to manufacture of course. Quote Link to comment Share on other sites More sharing options...
Yoruk Posted May 14, 2020 Author Share Posted May 14, 2020 Thanks for the links. The first one is interesting, but they didn't share schematics. The second one does share one, and it actually uses "V R/W" signal. I asked the guy from Tynemouth Software a question about the "V R/W" and "C R/W" signals. The answer is quite simple : The initial read signal from the CPU is the "C R/W". The "V R/W" is the same but gated with the clock, so this signal is a bit shorter. For normal designs it's better to use the CPU one. But he also says that for a simple ROM access I simply don't need any reading signal at all, since I'll always read the memory. So all my ROM /OE pins should be tied to ground. Yes of course it's quite simpler any maybe cheaper to get an existing board, but I really do this for learning and educational purposes, so it's not a problem to spend a few hours on this. ? Your advices and help are for sure very helpful for me ! 1 Quote Link to comment Share on other sites More sharing options...
Yoruk Posted May 15, 2020 Author Share Posted May 15, 2020 On 5/13/2020 at 11:33 AM, carlsson said: Regarding this board, look like that header pins 17 and 18 (C R/W and V R/W) are nonexistent too, which confirm our analysis. This is the result of my reflections : So I have, if bank 5 chosen : Chip 1 : $A000-$A7FF, chip 2 : $A800-$AFFF chip 3 : $B000-$B7FF and chip 4 : $B800-$BFFF if bank 3 : $6000-$67FF, $6800-$6FFF, $7000-$77FF and $7800-$7FFF 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted May 15, 2020 Share Posted May 15, 2020 Do you have a treasure box full of 2K EPROM chips? I would've thought you would move towards 8K 2764 chips to reduce the number of chips, traces and vias. Quote Link to comment Share on other sites More sharing options...
Yoruk Posted May 15, 2020 Author Share Posted May 15, 2020 1 hour ago, carlsson said: Do you have a treasure box full of 2K EPROM chips? If you call this a treasure, well actually yes ! I've got a lot of them, that's why I use them in my designs. Of course it could be simpler to use a single 8k chip, but again I created this also for learning reasons ? 1 Quote Link to comment Share on other sites More sharing options...
Yoruk Posted May 22, 2020 Author Share Posted May 22, 2020 Here is the finished board : It was not easy due to the chip configuration. I choose to put them like instead of a single row, it was a bit easier to route !? 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted May 22, 2020 Share Posted May 22, 2020 Nice. I suppose bank 3 mode would be useful if you want to make your own cartridge with e.g. Programmer's Aid ($7000-$7FFF) and VIC-MON ($6000-$6FFF). Quote Link to comment Share on other sites More sharing options...
Yoruk Posted May 22, 2020 Author Share Posted May 22, 2020 (edited) Well I choose bank 5 to have an autostart feature and 3 to not have it. If this bank can also be used for existing codes that's even better ! Edited May 22, 2020 by Yoruk Quote Link to comment Share on other sites More sharing options...
Yoruk Posted May 23, 2020 Author Share Posted May 23, 2020 I've found some ROM dumps here... http://www.zimmers.net/anonftp/pub/cbm/vic20/roms/ But I'm not familiar with the ".prg" format. The author says that "The files are in PRG format, i.e. the first two bytes contain the starting address.". Looks like this sample starts at $A000 (witch make sense for a game to have the autostart) : This file length is actually 8194 bytes... So I think that I just have to remove the top two bytes before flashing my eproms ? Quote Link to comment Share on other sites More sharing options...
carlsson Posted May 23, 2020 Share Posted May 23, 2020 Yes, that is exactly how it works. A PRG file contains the load address in the format low, high byte and then the data as a binary. Quote Link to comment Share on other sites More sharing options...
Yoruk Posted May 23, 2020 Author Share Posted May 23, 2020 Ok thanks ! Quote Link to comment Share on other sites More sharing options...
Yoruk Posted June 22, 2020 Author Share Posted June 22, 2020 And.... it's a victory ! ? I manage to finally assemble and test my prototype yesterday. Burning the proms, populating the board... First I was a bit afraid because the board was almost completely inside the VIC, so it was not easy to probe signals with my scope. I just managed to check that the 5v and the ground seemed OK and at the good places. Then I checked some addresses contents with some PRINT PEEK and it was ok. Time to install all the chips and put the autoboot... And the game starts ! I was a bit confused at first : ok the game screen was here, but the computer was generating a continuous sound... I was afraid that it freezes. But after a couple of seconds the screen changed to an other one. I tried the game file in an emulator, same behavior, so maybe there is a problem with "Amidar". I'll try an other game to be sure, but meanwhile it looks like that my board is working fine. ? A big thanks for everybody ! 1 Quote Link to comment Share on other sites More sharing options...
Yoruk Posted June 24, 2020 Author Share Posted June 24, 2020 Ok I manage to burn chips with the 8k game "Droids", and it's a success. Sounds, music, gameplay, it works great. Absolutely same behavior between the computer and the emulator (event if I didn't exactly understand how to play ? ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.