
I'd be happy to look inside the ROM if no one else volunteers.
Moderator: BigEvilCorporation
It may be DOSBox glitching but I know you will also get a result similar to this if certain files are missing (I think EGAVGA.BGI, maybe part of a GUI library).r57shell wrote: I tried to check some things about GEMS.EXE, and I found it works glitchy in DOSBox.
Yep, EGAVGA.BGI was missing. Now everthing looks same as on your screenshot.powerofrecall wrote:It may be DOSBox glitching but I know you will also get a result similar to this if certain files are missing (I think EGAVGA.BGI, maybe part of a GUI library).
I don't asking about MIDI now, because it's worked on your side. I don't care about MIDI now.powerofrecall wrote:Normal DOSBox doesn't have any kind of MIDI in or pipe/socket type structure.
I hope sopowerofrecall wrote:So it shouldn't do anything strange like write over itself.
I don't care about hardware now. Of course it is one of ways to find out how it works all together, but looking in hardware much harder for mepowerofrecall wrote:We don't really know much about the hardware, do we?
It's not jump table... but you may call it so. In any point of code execution, A5 always $200, so jsr $4A(a5) is actually jsr $24A, which is where located "new data check".powerofrecall wrote:Some other stuff I've noticed: while I was disassembling it I noticed there's a jump table of stuff nothing seems to cross-reference in IDA. Have you figured this out yet?
Yes, it's almost full filled with 0xFF. And actual rom size very small.powerofrecall wrote:Also, the ROM I made from the ABS file is very small. Something like 18kb.
Check GEMS.DOC in requirements there is only: LPT cable, hardware loader.powerofrecall wrote:Were there any external connections from the Genesis other than a parallel cable connected to the EXT port?
Code: Select all
byte ext_read()
{
while (EXT&0x10); // wait for data
low = EXT;
EXT = 0; // may be for next part, but there is no wait after it.
high = EXT;
EXT = 0x40; // acknowledge
return (low & 0xF) | ((high&0xF)<<4);
}
byte read_byte()
{
do { low = ext_read(); } while (!(low & 0x80));
do { high = ext_read(); } while (!(high & 0x80));
return ((high << 1) & 0xF0) | (low & 0xF);
}
You're right, knowing the hardware isn't as important as knowing how it works.r57shell wrote: I don't care about hardware now. Of course it is one of ways to find out how it works all together, but looking in hardware much harder for me.
I should have noticed this, its a quirk of the Microtec C compiler. I think it always uses this form of short addressing when set to 'small code' model. It's also why IDA couldn't figure it out. Sometimes I let IDA do most of the work and forget to use my brain.r57shell wrote:In any point of code execution, A5 always $200, so jsr $4A(a5) is actually jsr $24A, which is where located "new data check".
But this is what I'm excited about. Nice work! I am going to keep going through the ROM and try to learn about that extra RAM that is on the cartridge to see if it might be possible to hack support into an emulator.r57shell wrote: Check GEMS.DOC in requirements there is only: LPT cable, hardware loader.
Ok, Genesis side completely revealed.
All works in following way:
EXT byte format: ?a?n dddd
a - acknowledge
n - new data not available
d - 4 bits of data
I don't know how it works, and why in this way, but only read_byte used for receiving commands from PC.Code: Select all
byte ext_read() { while (EXT&0x10); // wait for data low = EXT; EXT = 0; // may be for next part, but there is no wait after it. high = EXT; EXT = 0x40; // acknowledge return (low & 0xF) | ((high&0xF)<<4); } byte read_byte() { do { low = ext_read(); } while (!(low & 0x80)); do { high = ext_read(); } while (!(high & 0x80)); return ((high << 1) & 0xF0) | (low & 0xF); }
Actually, after thinking a little bit about it... may be it's acknowledge, and $40 is - ack clear.r57shell wrote:EXT = 0; // may be for next part, but there is no wait after it.
Code: Select all
void write_byte(byte b)
{
DATA = b;
int c = CONTROL;
CONTROL = c|1;
while (STATUS & 0x40);
c = CONTROL;
CONTROL = c & (~1);
while (!(STATUS & 0x40));
}
It's obvious, if you read this topic. I don't like to type things to those who don't read it, so reread topic.MintyTheCat wrote:1. Would it be possible to replicate GEMS and to use it on modern systems?
2. What are the shortcomings of GEMS for Musicians and could an improved version of GEMS be developed as a community?
You have missed my points entirely.r57shell wrote:It's obvious, if you read this topic. I don't like to type things to those who don't read it, so reread topic.MintyTheCat wrote:1. Would it be possible to replicate GEMS and to use it on modern systems?
2. What are the shortcomings of GEMS for Musicians and could an improved version of GEMS be developed as a community?
My current trouble, is: I can't build "DOSBox Daum" with VS2010 dosbox from sources now, I'm trying to solve this problem. It requires many of libraries, not all of them providing developer kits, so I have to build myself those libraries myself. I spent a lot of time to build SDL_Sound, but it looks like it's not compatible with "DOSBox Daum".
Still in progress.