Sonic and Sega Retro Message Board: Decoding confusing VDP control data - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Page 1 of 1
    Locked
    Locked Forum

Decoding confusing VDP control data

#1 User is offline Orangy Tang 

Posted 04 April 2018 - 08:06 AM

  • Posts: 15
  • Joined: 24-June 11
I'm trying to decipher these vdp commands from a commercial rom:

MOVE.w	$FFFFF7E4.w, VDP_controlPort
MOVE.w	$FFFFF7D0.w, VDP_controlPort



Using the reference guide here: http://info.sonicret...n/General/Ports

Since they're moving words to the control port, I thought it was writing to registers, but that doesn't make sense since F7E4 has the top two bits set, which is apparently wrong for writing to a register.
If I assume the first MOVE is actually writing a long (and therefore setting a VDP address) then the CD0/1/2/3 decodes to 1011, which isn't in the access type table.
If I assume both MOVEs combine to write one long of F7E4F7D0, then CD0/1/2/3 decodes as 0111, which also isn't in the access type table.

Clearly I'm interpreting this incorrectly - can anyone tell me where I'm reading it wrong?

Thanks.

#2 User is offline Natsumi 

Posted 04 April 2018 - 12:09 PM

  • Miss Fox
  • Posts: 170
  • Joined: 08-February 12
  • Gender:Female
  • Location:Otter's lap
  • Project:Being with my boyfriend
It's reading from RAM addresses from the looks of it. See what's in RAM addresses $F7E4 and $F7D0, those are probably gonna be edited dynamically depending on what's going on in the game.

#3 User is offline MarkeyJester 

Posted 04 April 2018 - 08:02 PM

  • It's Saturday TV Toons!! (90's Style)
  • Posts: 1860
  • Joined: 22-July 08
  • Gender:Male
  • Location:Japan
  • Wiki edits:16
Are you sure you are decoding this correctly?

You stated that CD0/1/2/3 decodes to 1011, but if the top two bits are set in RAM F7E4 as you suggest, then CD0 and CD1 will be set, as the two most significant bits in the word are assigned to them. If this is the case, then it's likely going to be a CRAM write address.

If the highest bit of RAM byte $FFFFF7D1.w is set, then this will be assigned to CD5, and it'll be treated as a DMA related transfer into CRAM.

#4 User is offline Orangy Tang 

Posted 05 April 2018 - 04:38 AM

  • Posts: 15
  • Joined: 24-June 11

View PostMarkeyJester, on 04 April 2018 - 08:02 PM, said:

Are you sure you are decoding this correctly?

Nope! That's why I asked. :)

I think my mistake was misreading the actual instructions - I thought it was moving literal $F7E4, not the actual contents of ram at $F7E4. It's starting to make more sense now, thanks both!

Btw MarkeyJester your 68k guide is super useful, so thanks for that. :)

Page 1 of 1
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users