Jump to content

Recommended Posts

I'm looking for advices to make games bigger than 32k.

 

Any source codes will be fine.

Share this post


Link to post
Share on other sites

This thread here helped me get Megacart working:


The gamopat link that nanochess helped me out.  It's in French, and I had to use Google tran- I think you know French, so you should be ok.  Be sure to grab cvmkcart.exe and the example.

 

I had to install cygwin, PkK have a tutorial on how to use cygwin and what file to download.  http://www.colecovision.eu/ColecoVision/development/tutorial0.shtml

You may already have sdcc installed if you're using windows.  After getting Cygwin working, you can check if it is installed by typing sdcc -v.  I have no idea how to do Linux stuff and how to untar and install.  Just make sure to use slash and not backslash to type in the path like in Microsoft DOS.  I used window Run dialog box to make the ROM using cvmkcart.exe. 

I was only successful making 128KB and 256KB ROMs.  I tried 64KB but didn't really work.  I split my game up into 8 source code, 1 per bank. 

  • Thanks 1

Share this post


Link to post
Share on other sites
6 hours ago, Kiwi said:

This thread here helped me get Megacart working:


The gamopat link that nanochess helped me out.  It's in French, and I had to use Google tran- I think you know French, so you should be ok.  Be sure to grab cvmkcart.exe and the example.

 

I had to install cygwin, PkK have a tutorial on how to use cygwin and what file to download.  http://www.colecovision.eu/ColecoVision/development/tutorial0.shtml

You may already have sdcc installed if you're using windows.  After getting Cygwin working, you can check if it is installed by typing sdcc -v.  I have no idea how to do Linux stuff and how to untar and install.  Just make sure to use slash and not backslash to type in the path like in Microsoft DOS.  I used window Run dialog box to make the ROM using cvmkcart.exe. 

I was only successful making 128KB and 256KB ROMs.  I tried 64KB but didn't really work.  I split my game up into 8 source code, 1 per bank. 

Thanks Kiwi. I will take a look at it.

 

Yeah. French is my native language.

 

Share this post


Link to post
Share on other sites

I don't tend to follow the trends, but you can also take a look at my tutorial. It's a bit old, I don't know if my modified linker works with the current version of SDCC. It's the technique used for Mario Bros and (eventually) Super Space Acer. ;)

 

https://www.harmlesslion.com/software/switching

 

Share this post


Link to post
Share on other sites

I use sdldz80 included with makemegacart.exe. I put original sdldz80 in backup directory.

 

I get error when compiling and nothing happens when using makemegacart.exe

 

 

Share this post


Link to post
Share on other sites

Well... your CRT0 failed to assemble. You can't ignore the error messages. If you look, the crt0.ihx is not in the folder at all as a result.

 

The error is that there is an unknown symbol on lines 77 and 78. If it's still the same crt0 I provided, then those are the calls to _vdpinit, and _main. However, they shouldn't be failing until the link stage... is your IDE there trying to build a full program from the one file?

 

I don't recognize the IDE there, but it's possible something has changed in the SDCC assembler since I released my package. In my example I'm using assembler flags -plosgff, I don't see any flags on your command line. p is just disable listing pagination, l is create .lst file, o is create object (rel) file, s is create symbol (sym) file, g is make undefined symbols global, and ff is flag relocatable references by mode in the listing. At the very least, it's probably the absence of g that is causing the error.

 

While I appreciate that you set up the command line nicely in the shortcut, if you want to see error messages from console applications you should run them in the console. The shortcut is a neat idea for when it's all working, but not helpful for troubleshooting. It would likely outright tell you that the input file is missing.

 

 

 

Share this post


Link to post
Share on other sites

I don't think you can make a Megacart using CCI2 or CCI3.  You'll need a command-line program that lets you type in command how to compile the source code.  The main source code is fine, but you'll need to split up source code into 8 source codes if you're using 128KB. 

 

CCI3 is fine for 32KB program, I still use it.  If I'm going Megacart, I use Cygwin.  I'm not sure if there's any other command-line program that can interface with SDCC. 

CCI3 fine with, sdcc -c -p -mz80 --vc --no-std-crt0 vanguardmain.c  
 

The problem is defining the code/graphic to specific bank, the command,
sdcc -c -mz80 --vc --no-std-crt0 --constseg bank1 --codeseg bank1 vnbank1.c
which CCI3 can't do.

Once you get all 8 source code compiled, you need to link them like,
sdcc -mz80 --no-std-crt0 -Wl-b_bank1=0xc000 -Wl-b_bank2=0xc000 -Wl -b_bank3=0xc000 -Wl -b_bank4=0xc000 -Wl -b_bank5=0xc000 -Wl -b_bank6=0xc000 -Wl -b_bank7=0xc000 --code-loc 0x8048 --data-loc 0x7000 ../crtcv.rel ../cvlib.lib ../getput.lib ../comp.lib vanguardmain.rel vnbank1.rel vnbank2.rel vnbank3.rel vnbank4.rel vnbank5.rel vnbank6.rel vnbank7.rel

Lot's of typing yes, but Cygwin saves your most recent entries, I think it's capped at 50 entries.  CCI3 can't link them automatically.  Also, you can copy and paste from Cygwin, which msdos command line I don't think can do.

 

And you need to make a ROM, cvmkcart.exe I use to generate 128KB ROM,
C:\sdcctest\Vanguard2\cvmkcart.exe -icrtcv.ihx -b6 Vanguard.rom
I type this in Window's Run box.  It remembers about 20-30 entries, so you can type it only once.  I have Run command pinned to my taskbar. 

Keep in mind on switching bank.  Select the correct bank before jumping to the data/code. 

Here's the definition to add to your main source code.
 

unsigned char dummy;
#define SWITCH_IN_BANK0		{ dummy=(*(volatile unsigned char*)0xFFF8); } 
#define SWITCH_IN_BANK1		{ dummy=(*(volatile unsigned char*)0xFFF9); } 
#define SWITCH_IN_BANK2		{ dummy=(*(volatile unsigned char*)0xFFFa); } 
#define SWITCH_IN_BANK3		{ dummy=(*(volatile unsigned char*)0xFFFb); } 
#define SWITCH_IN_BANK4		{ dummy=(*(volatile unsigned char*)0xFFFc); } 
#define SWITCH_IN_BANK5		{ dummy=(*(volatile unsigned char*)0xFFFd); } 
#define SWITCH_IN_BANK6		{ dummy=(*(volatile unsigned char*)0xFFFe); } 
#define SWITCH_IN_BANK7		{ dummy=(*(volatile unsigned char*)0xFFFf); } 

Good luck.
 

Share this post


Link to post
Share on other sites

It's a lot of typing, but a simple makefile or even a batch file will save you from doing it more than once. ;)

 

  • Like 1

Share this post


Link to post
Share on other sites
On 5/18/2020 at 4:00 PM, Tursi said:

It's a lot of typing, but a simple makefile or even a batch file will save you from doing it more than once. ;)

 

I don't know computer enough to makefile or make a batch file.  ;)

4 hours ago, alekmaul said:

or just use my lib ;) :P !

Hard for this old dog(me) to learn new tricks, even though I'm not in my 40s yet. ;)  I will look into it and have F18A material ready. :)

Share this post


Link to post
Share on other sites
11 hours ago, Kiwi said:

I don't know computer enough to makefile or make a batch file.  ;)

Nonsense.

 

You type the exact same commands you are typing into the command prompt into a text file, save it with a ".bat" extension, and you just made a batch file. ;)

 

  • Like 1

Share this post


Link to post
Share on other sites
On 5/21/2020 at 11:36 PM, Kiwi said:

I don't know computer enough to makefile or make a batch file.  ;)

Hard for this old dog(me) to learn new tricks, even though I'm not in my 40s yet. ;)  I will look into it and have F18A material ready. :)

You know, I'm 53 years old man :P :D !

  • Haha 1

Share this post


Link to post
Share on other sites
14 hours ago, alekmaul said:

You know, I'm 53 years old man :P :D !

48 here! Gotta pass on the tricks to the young'uns! ;)

 

@kiwi No shame in sticking to what you know, but little things like that will make life easier when you go away and come back the next day, and don't have to type the commands again. I used batch files for years before finally learning enough Makefile to make use of them - the primary advantage driving me there being that make will skip files it doesn't need to rebuild. Sometimes I still write batch files instead of a Makefile. I'm still skeptical of a lot of build systems - for instance we use cmake at work which looks incredibly complex on the surface. I can see it has some value for large projects but I doubt I'll ever use it personally. ;)

 

Share this post


Link to post
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.

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