Page 1 of 3

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

Posted: Sat Feb 24, 2018 2:12 pm
by sverx
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

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

Posted: Sat Feb 24, 2018 6:42 pm
by cero
Google sega2f.htm

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

Posted: Sun Feb 25, 2018 2:58 am
by walker7

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

Posted: Mon Feb 26, 2018 12:16 pm
by sverx
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:

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

Posted: Mon Feb 26, 2018 6:45 pm
by Mask of Destiny
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.

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

Posted: Tue Feb 27, 2018 2:57 pm
by sverx
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: )

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

Posted: Tue Feb 27, 2018 3:54 pm
by TmEE co.(TM)
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.

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

Posted: Thu Mar 01, 2018 11:51 am
by sverx
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?

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

Posted: Thu Mar 01, 2018 4:10 pm
by Stef
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.

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

Posted: Thu Mar 01, 2018 7:46 pm
by Mask of Destiny
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.

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

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

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

Posted: Tue Mar 06, 2018 10:44 am
by sverx
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?

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

Posted: Tue Mar 06, 2018 5:59 pm
by TmEE co.(TM)
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.

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

Posted: Wed Mar 07, 2018 10:20 am
by sverx
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?

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

Posted: Thu Mar 08, 2018 3:29 am
by Sik
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).