|
Post by 3vix6 on May 14, 2010 0:10:50 GMT -5
Hi,
I'm new to the scene, I'd like to get involved and learn how to code on the Genesis.
I had a few questions, hopefully you all can answer..
1.) I assume that everyone uses GCC for cross compiling to the 68000, is there anything special that needs to be done for a game or demo to be playable on the Genesis?
2.) I've seen many books on Assembler and C on the internet, which do you recommend?
3.) What do you think of the Tototek flash carts? Do they work well?
Thanks!
|
|
|
Post by Shiru on May 14, 2010 2:54:22 GMT -5
Please detail the first question.
|
|
|
Post by TheMVRules on May 14, 2010 5:17:09 GMT -5
1. I always code in ASM, or in BEX 2. Begin with C, then ASM. 3. Use others. Tototek flash carts are old and depricated.
|
|
|
Post by 3vix6 on May 14, 2010 8:09:19 GMT -5
1. I always code in ASM, or in BEX 2. Begin with C, then ASM. 3. Use others. Tototek flash carts are old and depricated. What should I use instead of the Tototek carts? Any suggestions? Shiru: When compiling from GCC, normally one gets an a.out file as default (Atleast when compiling for x86)... Is this something that I would rename a bin file? or are there other things I need to do to get a simple compile to work on the Sega Genesis?
|
|
|
Post by Shiru on May 14, 2010 10:38:10 GMT -5
Well, in GCC version I'm using, you get size-aligned .bin as output, so you don't need to do anything with it. The cheapest (and good) Flash cart for SMD is Everdrive.
|
|
|
Post by 3vix6 on May 14, 2010 11:39:13 GMT -5
OK.. Thank you! Something like Everdrive was what I was looking for.
What is BEX?
|
|
|
Post by 3vix6 on May 14, 2010 11:41:13 GMT -5
I guess I was more referring to encryption, or anything needed to be done to bypass the mechanisms in the Genesis that make sure you're using an authentic Genesis Cartridge.. OR is there nothing like this I need to worry about?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on May 14, 2010 12:12:43 GMT -5
Hi 3vix6, BasiEgaXorz ( BEX ) is a IDE that lets you create Genesis / Megadrive games in the Basic ( + inline ASM ) language. Super easy to use Check it out @ devster.monkeeh.com/sega/basiegaxorz/
|
|
|
Post by Shiru on May 14, 2010 12:17:32 GMT -5
There is no encryption or complex protection in Genesis. TMSS, a protection system, introduced later in the console life, requires a word 'SEGA' in certain place in the memory, and also the same word should be sent to special HW register. All this is already done in init code in the mentioned GCC (sega.s). No protection chips in carts, fortunately. Regarding legality of bypassing the protection, there was a court case.
|
|
|
Post by 3vix6 on May 14, 2010 12:29:12 GMT -5
I read through it.. Definitely an interesting case.. Very informative.
I'll have to set up the compiler sometime over the weekend. I'll probably ask a few more questions on this forum.
Thanks a lot for your help!
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on May 14, 2010 12:43:56 GMT -5
1.) I assume that everyone uses GCC for cross compiling to the 68000, is there anything special that needs to be done for a game or demo to be playable on the Genesis? There are many ways to compile for the Sega with GCC . Depends on your environment - do you use Windows or Linux or a Commodore? For C programming, SpritesMind is the best community to go since there are tutorials and elitists there. I dunno if it's a very friendly environment for beginners, but you can try www.spritesmind.net
|
|
|
Post by 3vix6 on May 14, 2010 12:51:13 GMT -5
I use Linux, but I can use Windows if need be. If there are more options or a definite advantage of using one format vs another I would like to know.
People still use Commodore? (I'm assuming an Amiga right?)
|
|
|
Post by jlf65 on May 14, 2010 17:50:59 GMT -5
Here are my latest tools I use in Ubuntu: ASL: asl142bld54.7zGCC: gendev-20100411.7zThat lets you program for the Genesis or 32X in assembly, C, or C++ (not recommended due to memory limits).
|
|
|
Post by 3vix6 on May 14, 2010 21:11:10 GMT -5
Thanks a bunch for the files, I took a look at what you posted.. Very cool.. Much appreciated. :-)
I was wondering, I'm a bit new to this sort of thing.. I've done some programming in the past but that was Java and C/C++ for the x86 platform, so normally the defaults that were installed were good enough for doing what I wanted.
How would I set this up correctly to do cross compilation? I know this isn't as easy as setting up an an environment variable to point to the directory, or am I mistaken?
|
|
|
Post by jlf65 on May 14, 2010 22:51:01 GMT -5
Oh, right. Forgot to give you the secret handshake. You need to do these exports in the shell before using gcc. ASL doesn't need anything that I'm aware of. Exports to compile for Genesis: export GENDEV=/home/jlfenton/Tools/gendev export PATH=$GENDEV/m68k/bin:$GENDEV/bin:$PATH Exports to compile for 32X: export GENDEV=/home/jlfenton/Tools/gendev export PATH=$GENDEV/sh2/bin:$GENDEV/m68k/bin:$GENDEV/bin:$PATH Obviously, you just need to change the path to wherever you put the directory. I always like to put my toolchains in $HOME/Tools. Some example code: DMA audio example for 32X: DMAAudioTest32X.zipPlaying compressed PCM in real-time with just the Z80: musicdemo4.7zWolf3D and Spear of Destiny (shareware) for the 32X (with code): w3d-sod-sw-b5.zipThe devkit from Stef's package redone for my toolchain as a library: libmd.zipI think that version of libmd still has the bsr opcodes in the interrupt handlers. You'll need to change them (in md.s) to this: HBL:
movem.l %d0-%d1/%a0-%a1,-(%sp)
jsr _hblankcallback
movem.l (%sp)+,%d0-%d1/%a0-%a1
rte
VBL:
addq.l #1,vtimer
movem.l %d0-%d1/%a0-%a1,-(%sp)
jsr _vblankcallback
movem.l (%sp)+,%d0-%d1/%a0-%a1
rte
|
|