Jump to content

Photo

DIY Coleco 63 in 1 multicart


23 replies to this topic

#1 zCRP OFFLINE  

zCRP

    Space Invader

  • 42 posts

Posted Thu Nov 1, 2018 6:00 AM

Hi, I just finished building myself a multicart, following the very cool project by these French guys:

 

http://zx81.zx81.fre...-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!



#2 atariramy OFFLINE  

atariramy

    Space Invader

  • 11 posts
  • Location:Egypt

Posted Thu Nov 1, 2018 9:20 AM

very good job  :thumbsup:  :thumbsup:



#3 alekmaul OFFLINE  

alekmaul

    Chopper Commander

  • 208 posts
  • Location:Blois (France)

Posted Thu Nov 1, 2018 11:05 PM

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.



#4 zCRP OFFLINE  

zCRP

    Space Invader

  • Topic Starter
  • 42 posts

Posted Fri Nov 2, 2018 2:18 AM

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...



#5 alekmaul OFFLINE  

alekmaul

    Chopper Commander

  • 208 posts
  • Location:Blois (France)

Posted Fri Nov 2, 2018 1:39 PM

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.



#6 zCRP OFFLINE  

zCRP

    Space Invader

  • Topic Starter
  • 42 posts

Posted Thu Nov 8, 2018 4:32 PM

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



#7 newcoleco OFFLINE  

newcoleco

    Stargunner

  • 1,328 posts
  • Always Tired
  • Location:Quebec

Posted Sat Nov 10, 2018 7:00 AM

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.fre...-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:

attachicon.gifmame.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:

attachicon.gifActual_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!



#8 zCRP OFFLINE  

zCRP

    Space Invader

  • Topic Starter
  • 42 posts

Posted Sun Nov 11, 2018 8:56 AM

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.fre...-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 by zCRP, Sun Nov 11, 2018 8:58 AM.


#9 alekmaul OFFLINE  

alekmaul

    Chopper Commander

  • 208 posts
  • Location:Blois (France)

Posted Mon Nov 12, 2018 11:15 PM

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).



#10 zCRP OFFLINE  

zCRP

    Space Invader

  • Topic Starter
  • 42 posts

Posted Wed Nov 21, 2018 3:13 PM

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

 

 

Attached Files



#11 Querubin OFFLINE  

Querubin

    Combat Commando

  • 4 posts
  • Location:Spain

Posted Sat Nov 24, 2018 12:02 PM

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.

Attached Files



#12 zCRP OFFLINE  

zCRP

    Space Invader

  • Topic Starter
  • 42 posts

Posted Fri Nov 30, 2018 2:28 PM

If it boots a game instead of menu maybe you have inverted the roms? just try to swap them around...



#13 Querubin OFFLINE  

Querubin

    Combat Commando

  • 4 posts
  • Location:Spain

Posted Sat Dec 1, 2018 4:25 AM

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.



#14 zCRP OFFLINE  

zCRP

    Space Invader

  • Topic Starter
  • 42 posts

Posted Sun May 5, 2019 10:17 AM

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



#15 Tursi OFFLINE  

Tursi

    Quadrunner

  • 5,666 posts
  • HarmlessLion
  • Location:BUR

Posted Mon May 6, 2019 6:04 PM

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.

#16 zCRP OFFLINE  

zCRP

    Space Invader

  • Topic Starter
  • 42 posts

Posted Sat May 11, 2019 12:49 PM

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?



#17 Tursi OFFLINE  

Tursi

    Quadrunner

  • 5,666 posts
  • HarmlessLion
  • Location:BUR

Posted Sat May 11, 2019 6:55 PM

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.

#18 Pixelboy OFFLINE  

Pixelboy

    Quadrunner

  • 8,243 posts
  • Location:Montreal, Canada

Posted Sun May 12, 2019 12:09 PM

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. :)

#19 Shawn OFFLINE  

Shawn

    As Above

  • 19,096 posts
  • So Below

Posted Sun May 12, 2019 12:21 PM

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 :)



#20 Tursi OFFLINE  

Tursi

    Quadrunner

  • 5,666 posts
  • HarmlessLion
  • Location:BUR

Posted Sun May 12, 2019 2:04 PM

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. ;)

#21 zx-81 OFFLINE  

zx-81

    Combat Commando

  • 1 posts

Posted Sun May 12, 2019 3:53 PM

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



#22 Shawn OFFLINE  

Shawn

    As Above

  • 19,096 posts
  • So Below

Posted Sun May 12, 2019 4:05 PM

See! Told you guys Ludo was easy to get a hold of :) I messaged him and told him about this thread ;)



#23 Yurkie OFFLINE  

Yurkie

    Q*bert Champion

  • 4,090 posts
  • US Distributor for NESRGB and 2600RGB
  • Location:Toledo, Ohio

Posted Mon May 13, 2019 7:07 PM

Very interesting thread. Sure would be awesome to make a 63 in 1 cart.



#24 Shawn OFFLINE  

Shawn

    As Above

  • 19,096 posts
  • So Below

Posted Yesterday, 1:36 PM

Got my 31 in 1 board from Ludo today and it's awesome. Well worth the 35 EURO.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users