Jump to content
IGNORED

DIY Coleco 63 in 1 multicart


zCRP

Recommended Posts

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:

post-42028-0-61736900-1541073068_thumb.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:

post-42028-0-24370500-1541073079_thumb.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!

  • Like 1
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

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!

Link to comment
Share on other sites

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 by zCRP
Link to comment
Share on other sites

  • 2 weeks later...
  • 5 months later...

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

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 by leonlas
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...