Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - VDP register 7 not actually changing background colour?

Reply to topic
Author Message
  • Joined: 26 Feb 2020
  • Posts: 3
Reply with quote
VDP register 7 not actually changing background colour?
Post Posted: Wed Feb 26, 2020 6:34 am
Hey all, been trying to get to grips with sms programming so i decided to start off with a program that detects hardware configuration - if you're running on an SG-1000, Mark III, or Power Base, if an FM Unit is connected, stuff like that - and draw a colour to the background based on what gets detected. This is accomplished by selecting a colour from the sprite palette through VDP register 7.

At least it would be, but it seems to only ever want to use colour 0, in all three emulators that i've tried (MEKA, Fusion, Emulicious). Memory editors show the register is indeed getting changed. I've tried changing the value before and after enabling video output, writing to cram in case it'd trigger an update somewhere, i've even discovered when stepping through the execution that MEKA doesn't emulate the Audio Control port properly (or at least given the information in the dev pages here), but i'm not sure why this isn't working. VDP Mode is 4, i cleared VRAM entirely, is there something simple i'm missing? I know i could work around this by just changing palette entry 0 instead, but i'd like to at least clear this up.

  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13144
  • Location: London
Reply with quote
Post Posted: Wed Feb 26, 2020 8:27 am
My guess is that the screen is on. With cleared VRAM, that gets you all tile 0, and tile 0 is all palette index 0. Also, your sprite palette is black.
  View user's profile Send private message Visit poster's website
  • Joined: 26 Feb 2020
  • Posts: 3
Reply with quote
Post Posted: Wed Feb 26, 2020 9:17 am
D'oh, that was indeed the problem - when i had tried moving the palettes 16 bytes later, i only tested that one in MEKA (which doesn't seem to have an option to show overscan?) and must have thought the tiles would have been transparent or something. The overscan colour change does work correctly with that change, i just had to check with another emulator.



Next change i think will be to get the tiles to use the sprite palette, to match the colour of the overscan. Thanks again!
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2622
Reply with quote
Post Posted: Wed Feb 26, 2020 11:01 am
you can just turn off the display and everything will be 'overscan' color
  View user's profile Send private message Visit poster's website
  • Joined: 26 Feb 2020
  • Posts: 3
Reply with quote
Post Posted: Wed Feb 26, 2020 11:13 am
...well that certainly made it a lot simpler than the other way. Is this information anywhere in the dev pages? I don't think it would have ever ocurred to me that it would still output something with the display disabled.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2622
Reply with quote
Post Posted: Wed Feb 26, 2020 1:45 pm
the VDP still generates the image for the TV.

you want to use register #1, the 6th bit. see here.
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!