Jump to content
IGNORED

Detecting SGM ?


CrazyBoss

Recommended Posts

Hi

 

Can I used read of byte 0x1988 to detect the SGM ?

 

ld a,($1988)

 

has value $7 when SGM is plugged. Dont know if that is a safe way to detect the module or there is another way is better ?

 

Should there be a forum for Programming SGM ? or should this tread be moved to Programming Forum ?

 

 

Link to comment
Share on other sites

:lol: :lolblue: Your Colecovision is failing!!!

 

The BIOS is contained in $0000-$1FFF and the bytes contained shouldn't change NEVER.

 

The best method is as Opcode outlined in http://atariage.com/forums/topic/203851-super-game-module-technical-forum/ you should add only a memory test after enabling SGM memory.

 

It's what I've done in my SGM test program http://atariage.com/forums/topic/211871-sgm-test-rom/?do=findComment&comment=2748035

 

Let me repeat my answer to your previous topic about same subject http://atariage.com/forums/topic/228697-sgm-ram-vs-the-cv-1k-build-ram/?do=findComment&comment=3051929

  • Like 1
Link to comment
Share on other sites

Nanochess are you sure about this ? It seems like the SGM replace the build-in bios by the one in the SGM. The original bios set $F to VDP Register 4, and the SGM bios change that byte to $7 - I do believe cause of the Extra (or replaced) charset used in the SGM Colecovision "load" screen.

 

At least its what happends in BLUEMSX with SGM support, but its an EMULATOR, cant test on real hardware.

 

By the way in bluemsx when run your SGM test rom, it thinks its an ADAM :)

 

The Memory $2000-$7FFF is enabled from the start.

 

And also in bluemsx, I didn not have any sucess out'ing to port $7F (to enable the memory from $0000-$1FFF)

Link to comment
Share on other sites

Nanochess are you sure about this ? It seems like the SGM replace the build-in bios by the one in the SGM. The original bios set $F to VDP Register 4, and the SGM bios change that byte to $7 - I do believe cause of the Extra (or replaced) charset used in the SGM Colecovision "load" screen.

I'm sure about it. As Pixelboy said, the SGM doesn't have a BIOS.

 

At least its what happends in BLUEMSX with SGM support, but its an EMULATOR, cant test on real hardware.

 

By the way in bluemsx when run your SGM test rom, it thinks its an ADAM :)

 

The Memory $2000-$7FFF is enabled from the start.

 

And also in bluemsx, I didn not have any sucess out'ing to port $7F (to enable the memory from $0000-$1FFF)

It's because BlueMSX doesn't have full support for Super Game Module, specially the port $7f for mapper.

 

It includes only the Opcode PSG module for the PSG sound, and you adjust manually the machine config to enable $2000-$7fff RAM like in ADAM. So my test shows it as an ADAM because the RAM is active from start.

 

In real hardware, the SGM memory doesn't appear until you activate it writing $01 to port $53, and the BIOS isn't changed to RAM until you write to port $7F. I know it because I've bought one SGM unit. ;)

Link to comment
Share on other sites

Maybe I am stupid, but where do the New charset and the improved charset at the boot screen come from ? There must be some data or rom inside the SGM. Is it possible that there is a patched bios rom inside the SGM and the SGM disable the original bios in the Colecovision.

 

Or maybe there is a normal rom which in run before the cartrigde, and this rom have will boot the cartrigde and showing the new bootscreen.?

 

see attached screen shot.

 

Or maybe this is only true for Bluemsx not for a real Colecovision with SGM?

 

 

 

 

 

post-8557-0-79778800-1408055553_thumb.png

Edited by CrazyBoss
  • Like 1
Link to comment
Share on other sites

Maybe I am stupid, but where do the New charset and the improved charset at the boot screen come from ? There must be some data or rom inside the SGM. Is it possible that there is a patched bios rom inside the SGM and the SGM disable the original bios in the Colecovision.

 

Or maybe there is a normal rom which in run before the cartrigde, and this rom have will boot the cartrigde and showing the new bootscreen.?

 

see attached screen shot.

 

Or maybe this is only true for Bluemsx not for a real Colecovision with SGM?

Ooooooohhhh, what version of BlueMSX are you using? or how you configurate it? I would like to give a look :)

 

BTW, the real SGM doesn't show anything of this. Probably it's only BlueMSX.

Link to comment
Share on other sites

Ooooooohhhh, what version of BlueMSX are you using? or how you configurate it? I would like to give a look :)

 

BTW, the real SGM doesn't show anything of this. Probably it's only BlueMSX.

 

I do believe I used a guide made by you :) from this forum :) it contain a file called bios_xp.rom which basicly is the coleco.rom but but the coleco.rom is moved to $2000, and byte $1988 is $07 instead of $0F, and the range from $0000-$1fff contains other data, a good guess must be the enhanced charset + the "COLECOVISION" logo.

 

I might be that ealier SGM ment to be like this, and it was dropped by opcode, in the final product ?

 

at www.colecovision.dk OLE mention: "This picture shows you first a 3-second start-up sequence for the SGM. Nicely animated. This start-up sequence will be used every time you turn on your ColecoVision with SGM plugged in. The start-up sequence is removed from the final module and will probably instead be showed in all new upcoming Super Games from OpCode Games."

 

so that is the answer :) so the rom is removed from the final product.

 

So a Super Game Module (Light) could be created - only for use with ADAM. Which only have the PSG inside. No need to have the Memory on the module.

 

Can the ADAM also disable the CV rom and use $0000-$1FFF for Memory ?

 

So the Easy way could be:

 

1) Check for a AY-3-8910 CPU - if found continue else exit.

2) Write two different bytes to $6000 and $6400.

3) Check if value of $6000 and $6400 are different, if so is an ADAM - jump to 5.

4) Enable the SGM ram by write 1 to port $53

5) write some data to $2000 and check if its written as it should. If not something is wrong - exit.

6) Continue the game code.

  • Like 1
Link to comment
Share on other sites

So a Super Game Module (Light) could be created - only for use with ADAM. Which only have the PSG inside. No need to have the Memory on the module.

The SGM is already 100% compatible with the ADAM. If I remember correctly, when the SGM is plugged into an ADAM, it uses the RAM in the ADAM instead of using its own RAM, in order to avoid hardware conflicts.

Link to comment
Share on other sites

 

Can the ADAM also disable the CV rom and use $0000-$1FFF for Memory ?

 

So the Easy way could be:

 

1) Check for a AY-3-8910 CPU - if found continue else exit.

2) Write two different bytes to $6000 and $6400.

3) Check if value of $6000 and $6400 are different, if so is an ADAM - jump to 5.

4) Enable the SGM ram by write 1 to port $53

5) write some data to $2000 and check if its written as it should. If not something is wrong - exit.

6) Continue the game code.

 

Yep, it's just right and reasonable :)

Link to comment
Share on other sites

The SGM is already 100% compatible with the ADAM. If I remember correctly, when the SGM is plugged into an ADAM, it uses the RAM in the ADAM instead of using its own RAM, in order to avoid hardware conflicts.

You are right, when using on ADAM you dont enable the SGM ram, but use ADAM's own ram - But I dont know if its possible to disable the CV bios in order to get ram area $0000-$1FFF ?

 

SGM dont do anything but provide the AY-3-8910 chip, until you enable the memory (which you should not do at an ADAM computer).

 

But strange why Opcode dropped the enhanced charset and Colecovision logo, it looks way better than the standard CV bootscreen, and also had "Skip by pressing fire" function :)

Link to comment
Share on other sites

You are right, when using on ADAM you dont enable the SGM ram, but use ADAM's own ram - But I dont know if its possible to disable the CV bios in order to get ram area $0000-$1FFF ?

Yes it is. I don't remember how to do it, but nanochess knows how.

 

 

But strange why Opcode dropped the enhanced charset and Colecovision logo, it looks way better than the standard CV bootscreen, and also had "Skip by pressing fire" function :)

It was mostly a question of cost, and also to make the SGM electronics fit into the ADAM Auto-Dialer casing.

Link to comment
Share on other sites

Maybe I am stupid, but where do the New charset and the improved charset at the boot screen come from ? There must be some data or rom inside the SGM. Is it possible that there is a patched bios rom inside the SGM and the SGM disable the original bios in the Colecovision.

 

Or maybe there is a normal rom which in run before the cartrigde, and this rom have will boot the cartrigde and showing the new bootscreen.?

 

see attached screen shot.

 

Or maybe this is only true for Bluemsx not for a real Colecovision with SGM?

 

 

 

 

 

 

Who made my enhanced BIOS publicly available? I don't remember releasing it...

That is why 1988h is different, because that was a bug in the original and I fixed that for the V9958.

Link to comment
Share on other sites

This routine should enable the SGM ram if its not an Adam computer.

 

;Enable SGM

;modify AF,$6000,$6400

;

ld a,254

ld ($6000),a

cpl

ld ($6400),a

ld a,($6000)

cp 254

ret z

out ($53),a

ret

I don't get it, why is this routine useful? Doesn't the SGM itself decide if it's going to use the ADAM RAM instead of its own?

Link to comment
Share on other sites

No offense to Ole Nielsen, but his web site is not always completely correct and up to date. I know that the game software can detect if it's being run on an ADAM (RAM test works but no AY-3-8910 sound chip present) but where RAM usage is concerned, can someone please confirm that the game software needs to perform a special extra step when the SGM is plugged into an ADAM?

Link to comment
Share on other sites

Okay, I see... The 2000h to 5FFFh range will already be writable RAM if it's an ADAM, so no need to activate the RAM in the SGM in that case.

yes you got it :)

 

actually Opcode recommend NOT to enable the SGM memory if its an Adam. And since we learned that the Memory at the Adam is not mirrored ($6000-$7FFF) we can do a simple test, by writing a value to $6000 and another value to $6400, if its a ColecoVision, then the byte written to $6400 will be written to $6000 (cause of mirrored ram)

 

 

This routine should enable the SGM ram if its not an Adam computer.

 

;Enable SGM
;modify AF,$6000,$6400
;
ld a,254
ld ($6000),a
cpl
ld ($6400),a
ld a,($6000)
cp 254
ret z
out ($53),a
ret

 

Just to explain the routine.

1) We load 254 (decimal) into $6000

2) We inverts all the bits of reg. A using CPL. (Funny enough reg. A will now be 1)

3) We load Reg. A (=1) into $6400 (If its a ColecoVision the ram mirroring means that $6000 will have this Value too)

4) We read the value of $6000 into Reg. A (if its an Adam it will be 254 as we did in STEP 1, else it will be 1 cause of step 3)

5) If the Value is 254 we return the routine.

6) We out value of reg. A to port $53 to enable the SGM RAM - reg. A = 1 and return the routine.

 

 

After this another routine is needed to check if the ram works, It could look like this:

 

ld hl,$2000
ld a,(hl)
inc (hl)
cp (hl)
jp z,xxxx ;jump to xxxx if its a Colecovision, and the ram is not enabled (maybe no SMG is plugged in, or malfunction).

 

Edited by CrazyBoss
Link to comment
Share on other sites

actually will it work ?

 

Is the ram area $6000-$7fff changed when enable the SMG memory? if so do a call and enable the ram will destroy the stack?

 

or do smg actually "only" enable the memory from $2000-$5FFF ? and $6000-$7fff is the 1k build in mirrored memory?

Link to comment
Share on other sites

actually will it work ?

 

Is the ram area $6000-$7fff changed when enable the SMG memory? if so do a call and enable the ram will destroy the stack?

 

or do smg actually "only" enable the memory from $2000-$5FFF ? and $6000-$7fff is the 1k build in mirrored memory?

 

Yep, activating the SGM memory will deactivate the mirrored memory, so the SGM activation routine should be at start of ROM and NOT in a subroutine.

Link to comment
Share on other sites

  • 2 weeks later...

By the way found this information at http://map.grauw.nl/resources/msx_io_ports.php#psg

 

The following table describes the registers of the PSG:

Register(s) Description 0-5 Tone generator control 6 Noise generator control 7 Mixer control-I/O enable
Important note: bit 6 must be 0, and bit 7 must be 1. Setting different values can cause damage on some systems. Safest approach is to just not touch them and read them first before writing a new value. 8-10 Amplitude control 11-13 Envelope generator control 14-15 I/O ports A & B

 

Seems like you could do damage to the psg, if you put wrong values to reg.7 :mad:

 

I dont know if its only at MSX or it could be the same for the SGM. I even saw MSX games, put a safety routine in there sound routine.

where they check for values on reg.7 and make sure those bits are right!!!!

Link to comment
Share on other sites

By the way found this information at http://map.grauw.nl/resources/msx_io_ports.php#psg

 

The following table describes the registers of the PSG:

Register(s) Description 0-5 Tone generator control 6 Noise generator control 7 Mixer control-I/O enable

Important note: bit 6 must be 0, and bit 7 must be 1. Setting different values can cause damage on some systems. Safest approach is to just not touch them and read them first before writing a new value. 8-10 Amplitude control 11-13 Envelope generator control 14-15 I/O ports A & B

 

Seems like you could do damage to the psg, if you put wrong values to reg.7 :mad:

 

I dont know if its only at MSX or it could be the same for the SGM. I even saw MSX games, put a safety routine in there sound routine.

where they check for values on reg.7 and make sure those bits are right!!!!

 

 

That is not the case with the SGM, the I/O ports aren't connected. You cannot damage anything...

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