Jump to content
opcode

Super Game Module technical forum

Recommended Posts

if someone has an Adam with SGM and they plug in DKA cart and DKA detects the Adam's memory, and therefore does not enable the SGM's memory, does the SGM's sound chip still work?

 

Yes. the extra RAM and the sound chip in the SGM are two completely distinct components. Even if the RAM is disabled in the SGM (because the ADAM's RAM is used), the sounds chip is still fully accessible and usable.

Share this post


Link to post
Share on other sites

I have both...but ADAM-only owners wouldn't appreciate that...

 

Hi youki.

 

That would be a serious problem.

 

Maybe the module should be: "Only for use with ColecoVision".

 

I can see what you mean.

Share this post


Link to post
Share on other sites

This issue of the extra RAM not working with the Adam has me confused. If the extra RAM cannot be enabled on the Adam then are there going to be SGM games that won't run on the Adam because they require the extra RAM? Since the SGM is designed to work with both the Colecovision AND the Adam, is that extra RAM just always going to be unused to insure compatibility between both systems?

Share this post


Link to post
Share on other sites

Ok, second and final part of the technical discussion about the SGM.

For sound the SGM offers an extra PSG, the AY-3-8910. It has similar sound capabilities as the CV PSG (SN76489), however it has a few advantages. Frequency range is much improved (both extremes of the human audible spectrum), and it offers volume envelopes. The AY-3-8910 was used by a large number of arcade games around 80-83, and was also featured on such computers as Atari ST and MSX.

The 3 sound channels of the SGM are then mixed with the CV PSG and output together. With that we now have 6 sound channels to play with, plus noise.

 

Differently of the SGM extra RAM, the AY-3-8910 is always active, so no need to activate it. I am not going to discuss the AY-3-8910 as tons of information can be easily found searching the web. The only information we need here is how to access the chip.

 

The SGM AY-3-8910 has been mapped to I/O ports 50h to 52h. 50h is the control port, used to set the register #. Port 51h is used to write data, while port 52h is used to read.

Another interesting fact about the AY-3-8910 is that all the registers can also be read. That is another way to check for the SGM, you can for example write data to any of the frequency register and read it back to see if the PSG is present.

Edited by opcode

Share this post


Link to post
Share on other sites

This issue of the extra RAM not working with the Adam has me confused. If the extra RAM cannot be enabled on the Adam then are there going to be SGM games that won't run on the Adam because they require the extra RAM? Since the SGM is designed to work with both the Colecovision AND the Adam, is that extra RAM just always going to be unused to insure compatibility between both systems?

 

The ADAM already includes the extra 32KB of RAM, so that is why you cannot activate the SGM RAM if used with an ADAM.

Edited by opcode

Share this post


Link to post
Share on other sites

This issue of the extra RAM not working with the Adam has me confused. If the extra RAM cannot be enabled on the Adam then are there going to be SGM games that won't run on the Adam because they require the extra RAM? Since the SGM is designed to work with both the Colecovision AND the Adam, is that extra RAM just always going to be unused to insure compatibility between both systems?

 

The extra RAM in the SGM is supposed to stay disabled when the module is plugged into an ADAM, because the ADAM's RAM is used instead. Eduardo has developed routines that he uses to detect the ADAM, and enables the extra RAM in the SGM only if a ColecoVision console is detected.

 

I do have a particular question though: The SGM offers two RAM modes, 24K and 32K (32K = BIOS disabled and replaced with RAM). Does the ADAM natively offer 32K of RAM to work with, or only 24K?

 

EDIT: Oops, already answered. Never mind. :)

Share this post


Link to post
Share on other sites

The SGM mimics the ADAM memory mapping, and that is the beauty of the thing. Isn't that cool? :)

Edited by opcode
  • Like 1

Share this post


Link to post
Share on other sites

The ADAM already includes the extra 32KB of RAM, so that is why you cannot activate the SGM RAM if used with an ADAM.

Understood. Thanks for clarifying.

Share this post


Link to post
Share on other sites

I've probably missed this somewhere, but after numerous searches I can't find it, so I figured I'd ask here.

Does the SGM use the CV system clock ( 3.579545MHz ) divided by 2 for the AY-3-8910, or is there a separate crystal (4MHz/2 = 2MHz ?) ?

Still working on an MSX-CV conversion, and (I think?) it makes a difference in the note frequency.

Share this post


Link to post
Share on other sites

I've probably missed this somewhere, but after numerous searches I can't find it, so I figured I'd ask here.

Does the SGM use the CV system clock ( 3.579545MHz ) divided by 2 for the AY-3-8910, or is there a separate crystal (4MHz/2 = 2MHz ?) ?

Still working on an MSX-CV conversion, and (I think?) it makes a difference in the note frequency.

I'm not sure. If nobody else responds with an answer, reply back here in a few days, and then I'll crack it open and scope it out.

Is it divided on the MSX? Eduardo probably made the set-up the same for the SGM.

Share this post


Link to post
Share on other sites

You use exactly the same frequencies as in MSX for SGM sound.

 

If you're doing a port from MSX to Colecovision, the SN76489 can use same values as AY-3-8910, just make sure you don't exceed 10 bits (AY-3-8910 has 12 bits of frequency)

Edited by nanochess

Share this post


Link to post
Share on other sites

Thanks!

AY-3-8910 datasheet states it needs 1-2MHz for a clock, so dividing the cpu clock is the easiest way.

The MSX runs the PSG at 1.7897725 MHz, which is half the cpu clock ( 3.579545MHz, same as the CV ), so of course he'd do it that way. :skull:

Also, adding an extra crystal just increases board size and cost, when the expansion port has a clock line already... Sometimes I think too hard about things and miss the obvious. :facepalm:

 

If you're doing a port from MSX to Colecovision, the SN76489 can use same values as AY-3-8910, just make sure you don't exceed 10 bits (AY-3-8910 has 12 bits of frequency)

I ran into that a few months back and posted a question in another thread here. However, when the MSX uses all 12 bits, that's when the fun starts... ;-)

Share this post


Link to post
Share on other sites

I may have missed this, I see how you can detect if you have an Adam or not but if you do have an how can I tell if an SGM is plugged into the Adam? I can't from the memory test as far as I can tell unless would it be by trying to toggle the bios out and ram in and changing a value in the bios area?

 

Share this post


Link to post
Share on other sites
22 minutes ago, Milli Vee said:

I may have missed this, I see how you can detect if you have an Adam or not but if you do have an how can I tell if an SGM is plugged into the Adam? I can't from the memory test as far as I can tell unless would it be by trying to toggle the bios out and ram in and changing a value in the bios area?

 

Look for the PSG. PSG registers are ready and write. I would suggest writing and reading back out of order, because it seems some ADAMs can have something in the same I/O port and will trick your routine if you write and read sequentially. 

Share this post


Link to post
Share on other sites
4 minutes ago, opcode said:

Look for the PSG. PSG registers are ready and write. I would suggest writing and reading back out of order, because it seems some ADAMs can have something in the same I/O port and will trick your routine if you write and read sequentially. 

Do you have a working code example of this - I cant test / debug on the PC when writing, only on the Adam or CV when testing, so any examples would be awesome!

Share this post


Link to post
Share on other sites
24 minutes ago, Milli Vee said:

Do you have a working code example of this - I cant test / debug on the PC when writing, only on the Adam or CV when testing, so any examples would be awesome!

;=========================
;CHECK PSG
;=========================
PSG_TST:
;==== DISPLAY "PSG:"
        LD HL,1844H
        LD DE,PSG_STR
        CALL LDVRM              ;WRITE "PSG:"
        LD HL,5502H
        LD DE,0AA00H
        CALL PSG_SET
        EX DE,HL                ;5502H
        CALL PSG_SET
        EX DE,HL                ;AA00H
        CALL PSG_TST1           ;TEST BYTE
        EX DE,HL                ;5502H
        CALL PSG_TST1           ;TEST BYTE
;IF PSG FOUND
;=== DISPLAY "OK"
PSG_TST3:LD HL,1854H
        LD DE,OK_STR
        JP LDVRM
;PSG TEST
PSG_TST1:LD A,E
        OUT (PSGCTR),A
        LD D,D
        IN A,(PSGRD)            ;READ BACK
        CP D
        RET Z                   ;RETURN IF OK
;IF PSG NOT FOUND
PSG_TST2:POP DE                 ;REMOVE RETURN POINT
;==== DISPLAY "NOT FOUND"
        LD HL,1854H
        LD DE,NOT_STR
        JP LDERR
;SET PSG
PSG_SET:LD A,E
        OUT (PSGCTR),A          ;SET PSG REG #0
        LD A,D
        OUT (PSGWRT),A
        RET

 

Share this post


Link to post
Share on other sites
15 minutes ago, opcode said:
;=========================
;CHECK PSG
;=========================
PSG_TST:
;==== DISPLAY "PSG:"
        LD HL,1844H
        LD DE,PSG_STR
        CALL LDVRM              ;WRITE "PSG:"
        LD HL,5502H
        LD DE,0AA00H
        CALL PSG_SET
        EX DE,HL                ;5502H
        CALL PSG_SET
        EX DE,HL                ;AA00H
        CALL PSG_TST1           ;TEST BYTE
        EX DE,HL                ;5502H
        CALL PSG_TST1           ;TEST BYTE
;IF PSG FOUND
;=== DISPLAY "OK"
PSG_TST3:LD HL,1854H
        LD DE,OK_STR
        JP LDVRM
;PSG TEST
PSG_TST1:LD A,E
        OUT (PSGCTR),A
        LD D,D
        IN A,(PSGRD)            ;READ BACK
        CP D
        RET Z                   ;RETURN IF OK
;IF PSG NOT FOUND
PSG_TST2:POP DE                 ;REMOVE RETURN POINT
;==== DISPLAY "NOT FOUND"
        LD HL,1854H
        LD DE,NOT_STR
        JP LDERR
;SET PSG
PSG_SET:LD A,E
        OUT (PSGCTR),A          ;SET PSG REG #0
        LD A,D
        OUT (PSGWRT),A
        RET

 

Awesome thank you!

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