|
Post by TheMVRules on May 15, 2010 7:47:57 GMT -5
|
|
|
Post by 3vix6 on May 15, 2010 22:42:47 GMT -5
Hi!
Thanks again for everything so far, I do have a few more questions.. First,
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
When doing this do I need to have done both of these above or do I just need to do the one stated for the 32x? I'm seeing that the directories added to the PATH are almost the same for each with the only difference for the 32x being the addition of the SH2 directory.
next, for the libmd that you had, I changed the HBL and VBL as you specified, just now, I have no idea what to do with it.. I see that there is a libmd.a in the m68k/sdk directory, but this is probably unrelated.. Could you give me a few hints on where to go from here?
Thanks everyone many times over for all of your help!
|
|
|
Post by jlf65 on May 16, 2010 17:34:50 GMT -5
Just do the exports for the 32X for the 32X. Just do the exports for the Genesis for the Genesis. The purpose is to direct the make file to the proper binaries. The default will go to the first place it finds it. I don't think my 32X make files use the m68k path, but point directly to the m68k binary instead (look at the makefile for the DMA example as an example). You don't NEED the exports at all if you alter your makefiles to point to the binaries directly. I used the GENDEV/PATH exports mainly because I got used to the PSP toolchain doing that (ps2dev PSP toolchain and SDK). When you recompile libmd, just "make install" and it'll copy md.o, libmd.a, and the includes to the proper places (namely GENDEV/m68k/sdk/lib and GENDEV/m68k/sdk/include). All my MD/32X libs are designed so you just do "make clean" "make" "make install".
|
|
|
Post by 3vix6 on May 17, 2010 22:20:33 GMT -5
OK.. That explains it..
I got the libmd to compile correctly and I have the paths set in my .bashrc for the Megadrive. So, I think everything is working..
I tried compiling a simple test file that looks like the following.. (Minus the quotes) " #include "stdio.h"
int main(){
printf("Test");
}
"
I entered in the following in my console,
"gcc -I ~/Tools/gendev/m68k/include test.c"
I got the following output..
"/home/me/Tools/gendev/m68k/bin/ld.real: crt0.o: No such file: No such file or directory"
Any ideas what might be causing this?
|
|
|
Post by 3vix6 on May 17, 2010 22:33:28 GMT -5
One other question.. I read somewhere that the Genesis v2 and later models didn't contain the z80.. If later models of the Genesis (I'm assuming the v2 and above) don't contain the Z80, why is there any need to code for it?
|
|
|
Post by Tom Maneiro on May 17, 2010 23:35:08 GMT -5
The Z80 is PRESENT on all Genesis variants - otherwise sound would not work on most games.
The Genesis 2 DOES contain a Z80 (in a small QFP chip). In the Genesis 3, it's integrated on the main chipset. And pretty much every single clone under the sun has a implementation of the Z80.
|
|
|
Post by TheMVRules on May 18, 2010 7:35:12 GMT -5
As Tom said, the Z80 is a custom Sega chip on later systems, therefore not easy to spot on the PCB. But it's present.
|
|
|
Post by 3vix6 on May 19, 2010 9:28:34 GMT -5
OK, that must be the Custom SEGA chip that I saw on the mainboard when I ripped my Model 2 apart.
SO, If I don't care about sound, do I really need to care about the Z80 when I first start coding on the Genesis?
Next, are there any must have books on the M68000 and the Z80?
Also, does anyone know why I'm getting the error that I stated a few posts ago?
"/home/me/Tools/gendev/m68k/bin/ld.real: crt0.o: No such file: No such file or directory"
|
|
|
Post by TheMVRules on May 19, 2010 10:16:16 GMT -5
The largest custom Sega chip is the VDP.
No, the Z80 is only needed if you want voice samples during gameplay. The 68000 can control the YM2612 and PSG aswell, but it will reduce CPU cycles and make digital voice more possible if you use the Z80 for sound.
|
|
|
Post by jlf65 on May 22, 2010 1:59:49 GMT -5
Also, does anyone know why I'm getting the error that I stated a few posts ago? "/home/me/Tools/gendev/m68k/bin/ld.real: crt0.o: No such file: No such file or directory" Look at the musicdemo archive I linked previously... specifically the makefile. You are using the wrong linker script, and you should be using -nostdlib as well. The MD isn't a PC - you NEED to look over the examples provided so that you can figure out how to make a proper MD program.
|
|
|
Post by 3vix6 on Jun 2, 2010 23:21:15 GMT -5
OK.. After looking at the musicdemo, I see what's going on.
I got the music tutorial to compile correctly and loaded it in an emulator. Works.. (unfortunately, for some reason my install of linux defaulted to ALSA instead of OSS so I couldn't hear anything).. Oh well.. I'll have to wait until I get my everdrive to hear it.
I'll play with this some more! Thanks everyone!
|
|