Jump to content
IGNORED

RMT: tripple hit and archive


samurai

Recommended Posts

Hi guys.

 

Voting in 6502 compo is over i think, so i am publishing my entries to it.

 

They are covers from amiga mods:

- thermostat7

- gary&denise

- deluxe dream

 

you can find them in tripple_hit.zip

 

Also you can find all of my RMT productions in tatqoo_all.zip (ASMA warriors go get it ;) ).

 

Gretz

tripple_hit.zip

tatqoo_all.zip

Link to comment
Share on other sites

detecting stereo??...simple:

 

I assume the 2nd pokey is mapped at $D280-$D2FF:

 

Just disable the random generator on one of the pokeys and enable it on the other (some bit in IRQEN I think).

 

Then peek at RANDOM ($D20a) in both pokeys for several times. The register that's constant isn't generating random numbers and if $D28a is not constant, then you obviously have two pokeys.

Link to comment
Share on other sites

ehm...i am not good in hardware low-level stuff... can someone post just the routine so i can paste it in xasm?

 

What a lame excuse :P

 

Come on, you're a coder, it's not that hard. ;)

 

It's something like this:

 

mva #DISABLE irqen

mva #ENABLE irqen+128

ldx #16

_loop

lda random

eor random

bne _exit

dex

bne _loop

lda #2 (means 2 pokeys)

bne _end

_exit

lda #1 (means 1 pokey)

_end

rts

 

where #ENABLE is the bit-combination to turn on the random generator, and #DISABLE is for turning it off.

 

However I'm not sure if it's irqen you need to write to.

Link to comment
Share on other sites

Explanation:

 

if you have 1 pokey then:

 

random is turned off first, and then random is re-enabled (by mva #ENABLE irqen+128), but that's mirrored to the same register of the only one pokey. That means: random number register will change every cycle.

 

Then: with lda #random --> eor #random we look whether the random register is still the same after a few cyles. If it is (for 16 times) then it's a very unlikely coincidence (16 times the same value is polled) or you have a second pokey. But the loop will detect changing values so it will directly go to _exit to return a value of 1 in acc.

 

 

if you have 2 pokeys then:

 

random in first pokey is disabled, and in second pokey is enabled, so we expect a constant value in random (and a not constant value in random+128).

 

Then the checking loop will (hopefully) detect always the same value in random so there are two pokeys: the loop will continue returning 2 in acc.

Link to comment
Share on other sites

April the 1st :)

 

You cannot freeze random generator.

 

But I suppose it is possible to check the stereo by using the irq:


sei

mvx #1 $d20e

dex

stx $d21e

stx $d208



loop lda $d21e

lsr @

bcc mono

inx

bne loop



stereo equ *



mono equ *

Untested (it's 3:51AM).

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