zCRP Posted November 1, 2018 Share Posted November 1, 2018 Hi, I just finished building myself a multicart, following the very cool project by these French guys: http://zx81.zx81.free.fr/serendipity/index.php?/archives/522-ColecoVision-63-in-1-Flash-Cartridge.html I was able to successfully build the loader (after modifying some bits), assembled with all the roms and burned to PROMs. Now, if I run the multirom image in mame, everything works perfectly. This is a screenshot of the loader: I can browse the games, and upon firing, the correct ROM is started. But if I place the cart into my real Coleco (a French model), I get the following: The loader does actually work. I can scroll up and down (the left-most character moves accordingly), and upon firing the correct rom is started. But instead of a readable game list I just get mostly gibberish. The loader initialized the screen like this: disable_nmi(); screen_mode_1_text(); fill_vram0(0x2000,0x1800,0xf0); upload_default_ascii(NORMAL); paper(COLOR); enable_nmi(); cls(); screen_on(); While text is printed to screen with print_at() and center_string() calls. Am I missing something? Also, in the emu, upon resetting I get back to the loader, while on the actual CV, reset restarts the currently selected game, and I need to actually turn off and on again the CV to get back to the loader. Thanks for any suggestions! 1 Quote Link to comment Share on other sites More sharing options...
atariramy Posted November 1, 2018 Share Posted November 1, 2018 very good job Quote Link to comment Share on other sites More sharing options...
alekmaul Posted November 2, 2018 Share Posted November 2, 2018 Are you sure about your burning process ? I have also a burnt rom on a cv cart from zx81 (31in1, not 63) and it works fine on a real CV. Quote Link to comment Share on other sites More sharing options...
zCRP Posted November 2, 2018 Author Share Posted November 2, 2018 Are you sure about your burning process ? I have also a burnt rom on a cv cart from zx81 (31in1, not 63) and it works fine on a real CV. I believe the burning process is ok, since everything works except the loader which has corrupt text. I mentioned it above, but the important thing is that I modified the original loader quite a bit. The issue is that the modified loader works perfectly in an emulator, but not on a real CV... Quote Link to comment Share on other sites More sharing options...
alekmaul Posted November 2, 2018 Share Posted November 2, 2018 can it be a RAM issue ? are you sure you are not using too much ram ? Please, post or take a look at your sym file to know how much memory you are using. Quote Link to comment Share on other sites More sharing options...
zCRP Posted November 8, 2018 Author Share Posted November 8, 2018 Not sure how to read such a sym file. Here is the one for my main.c ASxxxx Assembler V02.00 + NoICE + SDCC mods (Zilog Z80 / Hitachi HD64180), page 1. Hexadecimal [16-Bits] Symbol Table .__.$$$. = 2710 L .__.ABS. = 0000 G .__.CPU. = 0000 L .__.H$L. = 0000 L 0 ___str_0 0126 R 0 ___str_1 0143 R 0 ___str_2 0149 R 0 ___str_3 01B2 R 0 ___str_4 01D3 R 0 ___str_5 02E1 R 0 ___str_6 02EB R __modsint **** GX __moduchar **** GX _center_string **** GX _cls **** GX _delay **** GX _disable_nmi **** GX 0 _display_banner 0198 GR 0 _display_banner_dx 003E GR 0 _display_game_list 01F4 GR _enable_nmi **** GX _fill_vram0 **** GX _game_loader_exec **** GX _get_game_name **** GX 0 _get_game_select 02F7 GR 0 _init_screen 0001 GR 0 _init_sound 002D GR _joypad_1 **** GX 0 _load_game 0276 GR 0 _main 03E8 GR 0 _nmi 0000 GR _paper **** GX _play_sound **** GX _print_at **** GX _screen_mode_1_text **** GX _screen_on **** GX _strcpy **** GX _strlen **** GX _upload_default_ascii **** GX ASxxxx Assembler V02.00 + NoICE + SDCC mods (Zilog Z80 / Hitachi HD64180), page 2. Hexadecimal [16-Bits] Area Table 0 _CODE size 468 flags 0 1 _DATA size 0 flags 0 2 _INITIALIZED size 0 flags 0 3 _DABS size 0 flags 8 4 _HOME size 0 flags 0 5 _GSINIT size 0 flags 0 6 _GSFINAL size 0 flags 0 7 _INITIALIZER size 0 flags 0 8 _CABS size 0 flags 8 Also, which .sym files should I consider? Must those for the .lib files be included as well? Thanks Quote Link to comment Share on other sites More sharing options...
newcoleco Posted November 10, 2018 Share Posted November 10, 2018 Hello, Without seeing your source code and the version of the devkit you are using, it is difficult to identify exactly the issue. But, to be sure to remove any glitch causing some VRAM corruption, I would try this: Init. like this... disable_nmi(); screen_mode_1_text(); /* screen graphics mode 1 and clear screen (old version also set screen on by default) */ screen_off(); /* in case using an old version of screen_mode_1_text */ disable_nmi(); /* always good to be sure NMI is disable before a massive VRAM update */ fill_vram0(0x2000,0x1800,0xf0); upload_default_ascii(NORMAL); paper(COLOR); /* is COLOR value set somewhere? */ /* cls(); - is good but not needed. See screen_mode_1_text description */ screen_on(); enable_nmi(); /* always good to enable NMI only after all the VRAM manipulations */ And if it's a case of NMI triggered during VRAM manipulation that causes the glitch. delay(1); /* Update VRAM right after NMI interupt is done, so wait a bit */ disable_nmi(); /* You may also want to disable NMI, but should not be necessary */ print...; print...; enable_nmi(); /* once all the print text on screen is done, enable NMI */ This way, you should avoid graphic glitches caused by NMI... as much as possible. Good luck! Hi, I just finished building myself a multicart, following the very cool project by these French guys: http://zx81.zx81.free.fr/serendipity/index.php?/archives/522-ColecoVision-63-in-1-Flash-Cartridge.html I was able to successfully build the loader (after modifying some bits), assembled with all the roms and burned to PROMs. Now, if I run the multirom image in mame, everything works perfectly. This is a screenshot of the loader: mame.png I can browse the games, and upon firing, the correct ROM is started. But if I place the cart into my real Coleco (a French model), I get the following: Actual_CV.JPG The loader does actually work. I can scroll up and down (the left-most character moves accordingly), and upon firing the correct rom is started. But instead of a readable game list I just get mostly gibberish. The loader initialized the screen like this: disable_nmi(); screen_mode_1_text(); fill_vram0(0x2000,0x1800,0xf0); upload_default_ascii(NORMAL); paper(COLOR); enable_nmi(); cls(); screen_on(); While text is printed to screen with print_at() and center_string() calls. Am I missing something? Also, in the emu, upon resetting I get back to the loader, while on the actual CV, reset restarts the currently selected game, and I need to actually turn off and on again the CV to get back to the loader. Thanks for any suggestions! Quote Link to comment Share on other sites More sharing options...
zCRP Posted November 11, 2018 Author Share Posted November 11, 2018 (edited) Thanks for the pointers. I wrote the roms to OTPs, so I cannot do a second run for now. I am now waiting for some EPROMS and an UV eraser to arrive from China The source code I used (with some changes) is available here: http://zx81.zx81.free.fr/serendipity/index.php?/archives/522-ColecoVision-63-in-1-Flash-Cartridge.html The Kit I am using has the following in the README: ColecoVision Startkit (for SDCC) Made by Daniel Bienvenu, 2009-2010. DATE : 26-AUGUST-2011 Is this the most appropriate to use? What is the best source describing all the APIs and usage? I must be quite frank, I just took the original source and the dev kit, built the libs, had to hack around a bit to get the loader compiling, and then I mostly focused on changing what is printed on the screen. I have no idea about NMIs, screen modes etc. Edited November 11, 2018 by zCRP Quote Link to comment Share on other sites More sharing options...
alekmaul Posted November 13, 2018 Share Posted November 13, 2018 as Daniel said, please share source code, it will be really easer to help you. Regarding sym file, I need the complete one for the global project (perhaps it is a map file which the tools you used). Quote Link to comment Share on other sites More sharing options...
zCRP Posted November 21, 2018 Author Share Posted November 21, 2018 Here is the modified main.c file, as well as the only map file in the project (I added txt extension to allow attachment upload). Original and rest of package is available at the link I posted above. Thanks main.c.txt crtcv.map.txt Quote Link to comment Share on other sites More sharing options...
Querubin Posted November 24, 2018 Share Posted November 24, 2018 I made this cartridge today and try to use the example roms without success. Mi CV boots on Jungle Hunt and not in the loader's game list. Could you explain how to make this rom files step by step?. I don't have a clue about scripts. All you need is on the 63in1 file. Thanks in advance. 63in1.zip Quote Link to comment Share on other sites More sharing options...
zCRP Posted November 30, 2018 Author Share Posted November 30, 2018 If it boots a game instead of menu maybe you have inverted the roms? just try to swap them around... Quote Link to comment Share on other sites More sharing options...
Querubin Posted December 1, 2018 Share Posted December 1, 2018 Thanks zCRP, that's the first I tried. Other game starts on this way. If I put this example roms on an emulator it starts with a game each one. No loader. Quote Link to comment Share on other sites More sharing options...
zCRP Posted May 5, 2019 Author Share Posted May 5, 2019 Hi, here is an update on this project. I was finally able to solve my issues described in the first post. It was not a matter of changing the screen initialization. Instead, I commented out a part of the code initializing sound, and suddenly it started working flawlessly. Now I have another issue: when I run my multicart in mame, when I start a game, then press F3 to reset, I get back to the menu. On a real CV, pressing the reset button restarts the currently selected game, not the menu. Does anybody have an idea of how I might get the CV to behave like mame? The code launching the game from the menu is as follows: ; loader.s .module game_loader_exec .globl _game_loader_exec ; void game_loader_exec( ushort bank_addr ); .area _CODE _game_loader_exec: ; GOAL : ; read bank_addr (0xffe0 to 0xfffe to change the bank) ; jump to 0x0000 (reboot) ; get the bank_addr on the stack ld ix, #0 add ix, sp ld c,2 (ix) ld b,3 (ix) ; ld a,(bc) ; bc contient la bank_addr ; code a executer maintenant sur la pile ; ; 0x0a - ld a,(bc) ; 0xc3 0x00 0x00 - jp 0x0000 ; on met le code a executer sur la pile ld de, #0x0000 push de ld de, #0xc30a push de ; execute le code sur la pile ld hl,#0x0000 add hl,sp jp (hl) bank_addr is set in the C part of the code as: bank_addr = 0xffc0 + game_sel; where game_sel is an integer between 0 and 62; the menu itself is at 63. Thanks for any help Christian Quote Link to comment Share on other sites More sharing options...
Tursi Posted May 7, 2019 Share Posted May 7, 2019 That's not going to be in your code, that's going to be in the latch that changes the active game. You would need to reset the 74HC574... I don't see a way to do that, but this is the first time I've looked at this schematic. I would first ask the designers if it is /supposed/ to go back to menu on reset. You may find that you have built it correctly. Quote Link to comment Share on other sites More sharing options...
zCRP Posted May 11, 2019 Author Share Posted May 11, 2019 I tried to contact the designers but they won't respond... I do not know enough about electronics to understand what happens there. In fact, I was wondering whether that behaviour depends on hw or sw. From what you write, it depends on hw and I can't do anything in the loader code to modify it. Correct? Quote Link to comment Share on other sites More sharing options...
Tursi Posted May 12, 2019 Share Posted May 12, 2019 From what I can see (so based on theory rather than practice), that is correct. In addition to what I called out above, the Coleco cart port doesn't appear to expose the reset line to the cartridge. I tested with my AtariMax and it doesn't go back to the menu on reset either. Quote Link to comment Share on other sites More sharing options...
Pixelboy Posted May 12, 2019 Share Posted May 12, 2019 From what I can see (so based on theory rather than practice), that is correct. In addition to what I called out above, the Coleco cart port doesn't appear to expose the reset line to the cartridge. I tested with my AtariMax and it doesn't go back to the menu on reset either. That's why the Atarimax SD cartridge has a little reset button on the cart itself. The only way to actually have a multicart that resets to the menu when you press the reset button is to design a bankswitching system with 4 banks of 8K each. The first bank is fixed and contains the menu software (and it's always located at 0x8000h on the cart), and the other banks are switchable to load the selected game. But this introduces two issues: 1) You're limited to 24K games, so the few 32K games in the CV's library cannot be included in the multicart. 2) You have to disassemble and fix the addressing in each ROM to run from 0xA000h instead of 0x8000h. Assuming you want to cram seven 16K games + Q*bert (which is only 8K) in a 128K multicart, that's a lot of effort just to be able to reset directly to the menu. Might as well just live with the reset button on the SD cart. Either that or you can track down one of the European Cocoleco homebrew multicarts (which is so unheard of that no one ever bothered to make a YouTube video about it, apparently). Not sure if the Cocoleco resets to the menu. Quote Link to comment Share on other sites More sharing options...
Shawn Posted May 12, 2019 Share Posted May 12, 2019 I tried to contact the designers but they won't respond... I do not know enough about electronics to understand what happens there. In fact, I was wondering whether that behaviour depends on hw or sw. From what you write, it depends on hw and I can't do anything in the loader code to modify it. Correct? You must have a bad contact email cause I've talked to Ludo as recent as 15 mins ago Quote Link to comment Share on other sites More sharing options...
Tursi Posted May 12, 2019 Share Posted May 12, 2019 The only way to actually have a multicart that resets to the menu when you press the reset button is to design a bankswitching system... There's actually another way. I've done this on the TI, so it would need to be tested, but it should work. You have the logic reset the latch when address >8000 is accessed. Since it should (in theory) only be accessed by the BIOS checking whether a cartridge is plugged in, it should be safe. The only gotcha that way is if a game reads that byte for any reason (deliberate or otherwise), it'll crash. However, with an emulator that can set breakpoints, you can run through the library pretty quickly to see if this happens on any significant titles. Quote Link to comment Share on other sites More sharing options...
zx-81 Posted May 12, 2019 Share Posted May 12, 2019 I tried to contact the designers but they won't respond... I do not know enough about electronics to understand what happens there. In fact, I was wondering whether that behaviour depends on hw or sw. From what you write, it depends on hw and I can't do anything in the loader code to modify it. Correct? Hi zCRP, We didn't put in place any reset mechanism to return to the menu. You have to switch off/on the console to get the menu working. I made this cartridge today and try to use the example roms without success. Mi CV boots on Jungle Hunt and not in the loader's game list. Could you explain how to make this rom files step by step?. I don't have a clue about scripts. All you need is on the 63in1 file. Thanks in advance. Hi Querubin, The loader is located in the last 32k block of the second eprom (so at the end of the total address space of the two eproms). If Jungle Hunt starts (located at position 31), and you have flashed properly the two binary files properly, then there is most likely an issue with the selection between the two eproms (as if the clock enables of the two eproms were not properly working). So i will look at the PCB : - the pin 14 of the 74HC574D - the Clock Enable of the two eproms (pin 22) - the transistor BS170 used to do an invertor Quote Link to comment Share on other sites More sharing options...
Shawn Posted May 12, 2019 Share Posted May 12, 2019 See! Told you guys Ludo was easy to get a hold of I messaged him and told him about this thread Quote Link to comment Share on other sites More sharing options...
+Yurkie Posted May 14, 2019 Share Posted May 14, 2019 Very interesting thread. Sure would be awesome to make a 63 in 1 cart. Quote Link to comment Share on other sites More sharing options...
Shawn Posted May 22, 2019 Share Posted May 22, 2019 Got my 31 in 1 board from Ludo today and it's awesome. Well worth the 35 EURO. Quote Link to comment Share on other sites More sharing options...
leonlas Posted June 12, 2020 Share Posted June 12, 2020 (edited) Zrobiłem dzisiaj ten nabój i staram się używać przykładowych ROM-ów bez powodzenia. Czy możesz wyjaśnić, jak krok po kroku tworzyć te pliki rom? Nie mam pojęcia o skryptach. pozdrawiam Leo Edited June 19, 2020 by leonlas 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.