Where do I start? I'm seeking technical documents.

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

sverx
Interested
Posts: 19
Joined: Fri Feb 16, 2018 3:18 pm

Where do I start? I'm seeking technical documents.

Post by sverx » Sat Feb 24, 2018 2:12 pm

Hello! new user here! :)
I recently got curious about the MegaDrive. I know virtually nothing about it, beside what's written on Wikipedia, and I'm seeking documents that will explain me the inner workings. So, to start, I'm after technical documents about:
  • the MD VDP
  • the Motorola 68000
  • how the MD internal works
Can you please point me to the right direction?
Thank you! :D
sverx [zvɛrks]: Nintendo DS/GBA & SEGA Master System retrodeveloper, Disjointed Studio co-founder & coder, devkitSMS author.

cero
Very interested
Posts: 222
Joined: Mon Nov 30, 2015 1:55 pm

Re: Where do I start? I'm seeking technical documents.

Post by cero » Sat Feb 24, 2018 6:42 pm

Google sega2f.htm

walker7
Interested
Posts: 45
Joined: Tue Jul 24, 2012 6:27 am

Re: Where do I start? I'm seeking technical documents.

Post by walker7 » Sun Feb 25, 2018 2:58 am

When programming, you can do it if you put your mind to it.

sverx
Interested
Posts: 19
Joined: Fri Feb 16, 2018 3:18 pm

Re: Where do I start? I'm seeking technical documents.

Post by sverx » Mon Feb 26, 2018 12:16 pm

cero wrote:
Sat Feb 24, 2018 6:42 pm
Google sega2f.htm
Found, thanks.
It says
COLOR:
- Uses CRAM (part of the VDP)
• 64 9-bit wide color registers
- 64 colors out of 512 possible colors
• 3 bits of Red
• 3 bits of Green
• 3 bits of Blue
• 4 palettes of 16 colors
- 0th color (of each palette) is always transparent
I wonder if the last line is correct - I mean, I can't display color 0 of any of the 4 palettes even if I use the tiles in a background?

also
For PAL (the European Television 50HZ standard), a vertical size of 30 cells (240 dots) is selectable.
and I wonder if this is true for each and every PAL model - and if still holds true if one mods his PAL MD with a 60Hz mod. :roll:
sverx [zvɛrks]: Nintendo DS/GBA & SEGA Master System retrodeveloper, Disjointed Studio co-founder & coder, devkitSMS author.

Mask of Destiny
Very interested
Posts: 563
Joined: Thu Nov 30, 2006 6:30 am

Re: Where do I start? I'm seeking technical documents.

Post by Mask of Destiny » Mon Feb 26, 2018 6:45 pm

sverx wrote:
Mon Feb 26, 2018 12:16 pm
I wonder if the last line is correct - I mean, I can't display color 0 of any of the 4 palettes even if I use the tiles in a background?
It is correct; however, the backdrop color (i.e. what's drawn in the borders or if all the layers above it are transparent) can be any of the 64 CRAM entries, including the ones that are normally transparent
sverx wrote:
Mon Feb 26, 2018 12:16 pm
I wonder if this is true for each and every PAL model - and if still holds true if one mods his PAL MD with a 60Hz mod. :roll:
It's true for every console running in 50Hz mode regardless of the actual standard of the composite encoder. PAL-M and normal PAL systems modded for 60Hz output do not support the V30 mode. Enabling V30 on a 60Hz console will get you very broken output; however, you can temporarily switch to V30 to bust the vertical borders (a technique used in Overdrive 2) without messing up sync.

Other document sources to consider: scans of the official documentation on Sega Retro (sega2f is derived from the official docs, but there's more stuff in the full set of scans) and this thread that aggregates various threads here documenting various low-level details and quirks.

sverx
Interested
Posts: 19
Joined: Fri Feb 16, 2018 3:18 pm

Re: Where do I start? I'm seeking technical documents.

Post by sverx » Tue Feb 27, 2018 2:57 pm

thus color 0 of each palette is actually completely useless/unused (well, at least three of them if one is used for the backdrop...)? What a waste. :roll:
you can temporarily switch to V30 to bust the vertical borders (a technique used in Overdrive 2) without messing up sync.
you mean temporary? Where can I read more details about this? (yeah, I know it's an advanced topic, but I'm curious :lol: )
sverx [zvɛrks]: Nintendo DS/GBA & SEGA Master System retrodeveloper, Disjointed Studio co-founder & coder, devkitSMS author.

User avatar
TmEE co.(TM)
Very interested
Posts: 2296
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Re: Where do I start? I'm seeking technical documents.

Post by TmEE co.(TM) » Tue Feb 27, 2018 3:54 pm

Only SMS/GG actually use the first index in a visible way, no other console does. So you're limited to using backdrop to make use of those first 4 indexes of each palette.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

sverx
Interested
Posts: 19
Joined: Fri Feb 16, 2018 3:18 pm

Re: Where do I start? I'm seeking technical documents.

Post by sverx » Thu Mar 01, 2018 11:51 am

TmEE co.(TM) wrote:
Tue Feb 27, 2018 3:54 pm
Only SMS/GG actually use the first index in a visible way, no other console does. So you're limited to using backdrop to make use of those first 4 indexes of each palette.
Which I guess implies that you won't have more than 61 different colors on screen at a given moment, at least without using backdrop/palette tricks mid-frame...

speaking of which, any suggestion of youtube videos where I can see any highlight/shadow effect?

Also, a different question. Did I get it wrong or the background 'size' definition is a single setting that affect both BGs (scroll A & B as the documents call them)? Thus is it not really possible to have, say, BG A 32x32 and BG B 64x64 tiles at the same time?
sverx [zvɛrks]: Nintendo DS/GBA & SEGA Master System retrodeveloper, Disjointed Studio co-founder & coder, devkitSMS author.

User avatar
Stef
Very interested
Posts: 2740
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Where do I start? I'm seeking technical documents.

Post by Stef » Thu Mar 01, 2018 4:10 pm

sverx wrote:
Thu Mar 01, 2018 11:51 am
speaking of which, any suggestion of youtube videos where I can see any highlight/shadow effect?
Vectorman game is generally a good example of highlight/shadow effect usage.
Also, a different question. Did I get it wrong or the background 'size' definition is a single setting that affect both BGs (scroll A & B as the documents call them)? Thus is it not really possible to have, say, BG A 32x32 and BG B 64x64 tiles at the same time?
Indeed, both planes share the same size setting.

Mask of Destiny
Very interested
Posts: 563
Joined: Thu Nov 30, 2006 6:30 am

Re: Where do I start? I'm seeking technical documents.

Post by Mask of Destiny » Thu Mar 01, 2018 7:46 pm

sverx wrote:
Tue Feb 27, 2018 2:57 pm
Where can I read more details about this? (yeah, I know it's an advanced topic, but I'm curious :lol: )
Check out this thread and the linked documentation.

sverx
Interested
Posts: 19
Joined: Fri Feb 16, 2018 3:18 pm

Re: Where do I start? I'm seeking technical documents.

Post by sverx » Fri Mar 02, 2018 10:17 am

walker7 wrote:
Sun Feb 25, 2018 2:58 am
http://jiggawatt.org/genvdp.txt
Is that the latest version available of that document? :|
sverx [zvɛrks]: Nintendo DS/GBA & SEGA Master System retrodeveloper, Disjointed Studio co-founder & coder, devkitSMS author.

sverx
Interested
Posts: 19
Joined: Fri Feb 16, 2018 3:18 pm

Re: Where do I start? I'm seeking technical documents.

Post by sverx » Tue Mar 06, 2018 10:44 am

sverx wrote:
Fri Mar 02, 2018 10:17 am
walker7 wrote:
Sun Feb 25, 2018 2:58 am
http://jiggawatt.org/genvdp.txt
Is that the latest version available of that document? :|
according to my searches, it is.

A much more important question: do I have to acknowledge the Vertical IRQ by reading the status register or any other VDP register or I/O port? It's so on the Master System, but I didn't read that here - have I overlooked it?
sverx [zvɛrks]: Nintendo DS/GBA & SEGA Master System retrodeveloper, Disjointed Studio co-founder & coder, devkitSMS author.

User avatar
TmEE co.(TM)
Very interested
Posts: 2296
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Re: Where do I start? I'm seeking technical documents.

Post by TmEE co.(TM) » Tue Mar 06, 2018 5:59 pm

Interrupts are auto-acknowledged on MD, there's no need to read the status port to get the next interrupt. Also on Z80 side, IRQ lasts entire line and if your handler finishes early it'll be called again due to it.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

sverx
Interested
Posts: 19
Joined: Fri Feb 16, 2018 3:18 pm

Re: Where do I start? I'm seeking technical documents.

Post by sverx » Wed Mar 07, 2018 10:20 am

TmEE co.(TM) wrote:
Tue Mar 06, 2018 5:59 pm
Interrupts are auto-acknowledged on MD, there's no need to read the status port to get the next interrupt. Also on Z80 side, IRQ lasts entire line and if your handler finishes early it'll be called again due to it.
I see. Thanks!

My next question is about 'shadow mode'.
From what I've read, for backgrounds it all depends exclusively on tile priority bit - if it's not set, the tile will go 'shadow mode' - but that means that there isn't any way to display sprites behind such a tile, as its priority bit isn't set, right?
sverx [zvɛrks]: Nintendo DS/GBA & SEGA Master System retrodeveloper, Disjointed Studio co-founder & coder, devkitSMS author.

User avatar
Sik
Very interested
Posts: 681
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Where do I start? I'm seeking technical documents.

Post by Sik » Thu Mar 08, 2018 3:29 am

Yeah, although if the sprite is also low priority then it will be shadowed as well, which can be useful for some effects (or for working around that limitation if you really insist by putting more sprites on top).

Only exception here is color 14 (for sprites). They never go shadowed regardless of palette. This can be annoying and has to be worked around e.g. by making that color black or using it only in tilemaps or high priority sprites, but you can also exploit it (e.g. put some light with that color and it'll remain bright when the rest of the sprite won't).

And of course, remember that colors 14 and 15 in palette 3 have special meaning for sprites (highlight and shadow respectively).
Sik is pronounced as "seek", not as "sick".

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest