More 315-5313 unknown stuff (speculation)

Talk about anything else you want

Moderator: BigEvilCorporation

HardWareMan
Very interested
Posts: 745
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Wed Jan 09, 2008 8:14 am

To understand how the VDP works, it is necessary to see how works the main component video system - VRAM. This Dual channel DRAM, incorporating feature is that the buses of address and data has been combined. The second port of serial access is connected separately. In order to obtain meaningful data needs to become attached to something. I used an active raster, which shows on TV. I took one of the colors (green), and instead VDAC connected to a digital output AD4. And got this picture:
Video 17 MBytes
As can be seen in video, the image is divided into 6 equal parts (I think in the 32-tiles mode they will be 5). First 5 (Section 1 - Section 5) are used for rendering plans A and B. Last one, 6 section is used for rendering sprites. You can see that the sections shifted to left (relative to the active raster), which is logical - picture needs a little advance preparation, to compensate for the delay in the schemes. In each section takes place 4 times read from VRAM to SO. Meanwhile, the rest of the time likely to be used by the processor. If you calculate that 40-tiles mode (320 pixels), it will mean that at one section accounts for 40 / 5 = 8 tiles (or 64 pixels), and one subsection 8 / 4 = 2 tiles (16 pixels). Section 6 seems totally preoccupied sprites reading, and shows that sprites coordinate Y is match, and the coordinates of X formed during basic raster drawing. But VRAM speed is limited. And size of sprite buffer inside VDP is unknown. So, maybe this is why we've got that limitation of srites per line?
Next, I switched green color on the serial exit SO4.
Video 14 Mbytes
It has become clear that all information service appeals to VRAM gone and emerged clean image data. However, they are highly compressed horizontally, just do not forget - is only 1 bit of the 8, and the pixel is 4 bits.
Image
On the field VBlank under raster we see processor accessing to memory during treatment interruptions - the same mysterious dots, which sometimes appear there.
So what everyone thinks about this?
PS Sorry for my terrible english. :oops:

Jorge Nuno
Very interested
Posts: 374
Joined: Mon Jun 11, 2007 3:09 am
Location: Azeitão, PT

Post by Jorge Nuno » Wed Jan 09, 2008 11:22 am

Ok so you used the video-out of the MD and connected a Vram pin to the green line?

I think this is not what i'm looking for... I'm trying to get a digital video out of the VDP, just like the system C2 does (I has the same VDP as the megadrive but it uses no RGB, but has pins 120-127 conected to a 8bit D latch, which don't connect to anything on a standart MD... (But connected to a TV I could only get diagonal lines with random pixels :( )

I'm sure it's possible to compute pixel data spying the VDP memory accesses but it's too complicated... The solution are pins 120-127, I'm almost sure, I just need to discover how...


Thanks for the effort :D

HardWareMan
Very interested
Posts: 745
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Wed Jan 09, 2008 12:05 pm

Tested pins [18-25, 120-127] in the same way.
[18-25] - showed noise in the lower part VBlank, below raster (I have PAL console).
[120-127] - showed noise similar to the noise of buses M68K.
Nothing reminds raster. Just VDP has dividers of master clock frequency (I have models with 17,7MHz quartz directly on pins VDP). So, not bad to be included sketches of the VDP circuit in the device "The System C2."
Last edited by HardWareMan on Wed Jan 09, 2008 12:24 pm, edited 1 time in total.

Jorge Nuno
Very interested
Posts: 374
Joined: Mon Jun 11, 2007 3:09 am
Location: Azeitão, PT

Post by Jorge Nuno » Wed Jan 09, 2008 12:13 pm

You want photos of system C2 arcade board? I have some links... please wait

schematics I don't have any... :(

EDIT
A pirate one: http://www.mameworld.net/maws/img/pcb/tantr.png

Official: http://www.mameworld.net/maws/img/pcb/puyopuy2.png
http://www.mameworld.net/maws/img/pcb/puyo.png (Low-Res)

Right-click on the links and save target as

High-Resolution pirate (equal to the first one)

http://www.citylan.it/tantrbl3/PCB%20co ... 20side.jpg


The SE-93 is a pirate VDP, TmEE has one in his megadrive (check his website if you don't beleive me)

Also I emailed Charles MacDonald about where those pins (120-127) are leading, but I suspect they are connected to the 2 Srams in the arcade board and a triple DAC... but i'm still waiting for a reply

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

Post by TmEE co.(TM) » Thu Jan 10, 2008 6:35 am

SE-93 is like the best pirate VDP chip ever, but unfortunately my MD clone is dead (stupid 7805 fried and killed everything with it).
All is 100% pin compatible, and 100% same in function.
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

Jorge Nuno
Very interested
Posts: 374
Joined: Mon Jun 11, 2007 3:09 am
Location: Azeitão, PT

Post by Jorge Nuno » Thu Jan 10, 2008 12:26 pm

I just sent a rom to HwMan, so he can tell me what's on those pins, but I won't release it yet because i'm using the font from hacking cult or devega, and I want to draw my own... :oops:

Are you sure the SE-93 is dead? Damn, I once supplied 7.2V to the MD for some minutes, and my original sega vdp did run very hot and it's still alive and kicking... (to payoff, it runs now at a miserable 3.65V, always cold) :P :D
Last edited by Jorge Nuno on Sat Feb 02, 2008 1:23 pm, edited 2 times in total.

HardWareMan
Very interested
Posts: 745
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Thu Jan 10, 2008 12:49 pm

Jorge Nuno wrote:The SE-93 is a pirate VDP, TmEE has one in his megadrive (check his website if you don't beleive me)
I know this. Also SE-93 = TA-06; SE-95 = TA-04 + TA-05 and SE-95 = TA07 = YM2612.
Jorge Nuno wrote:I just sent a rom to HwMan, so he can tell me what's on those pins, but I won't release it yet because i'm using the font from hacking cult, and I want to draw my own... :oops:
I begin test right now!

Jorge Nuno
Very interested
Posts: 374
Joined: Mon Jun 11, 2007 3:09 am
Location: Azeitão, PT

Post by Jorge Nuno » Thu Jan 10, 2008 12:51 pm

OK thanks again

HardWareMan
Very interested
Posts: 745
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Thu Jan 10, 2008 1:30 pm

It not starts. I guess you do wrong hardware initialization (or do not at all). I did same mistake, when began make own programms for MD. Do this:

Code: Select all

*Boot code
	move.l	sp,a7
	move.w	#$2700,sr
	tst.l	$a10008.l
	bne.s	SkipJoyDetect
	tst.w	$a1000c.l
SkipJoyDetect:
	Bne	SkipTable
	lea	Table(pc),a5
	movem.w	(a5)+,d5-d7
	movem.l	(a5)+,a0-a4
	move.b	-$10ff(a1),d0		*Version number
	andi.b	#$0f,d0
	beq.s	WrongVersion
	move.l	#$53454741,$2f00(a1)	*Security code (SEGA)
WrongVersion:
	move.w	(a4),d0
	moveq	#$00,d0
	movea.l	d0,a6
	move	a6,usp
	moveq	#$17,d1			*VDP setup
FillLoop:
	move.b	(a5)+,d5
	move.w	d5,(a4)
	add.w	d7,d5
	dbra	d1,FillLoop
	move.l	(a5)+,(a4)
	move.w	d0,(a3)
	move.w	d7,(a1)
	move.w	d7,(a2)
L0250:	btst	d0,(a1)
	bne.s	L0250
	moveq	#$25,d2			*Init A00000
Filla:	move.b	(a5)+,(a0)+
	dbra	d2,Filla
	move.w	d0,(a2)
	move.w	d0,(a1)
	move.w	d7,(a2)
L0262:	move.l	d0,-(a6)		*Zero RAM
	dbra	d6,L0262
	move.l	(a5)+,(a4)
	move.l	(a5)+,(a4)
	moveq	#$1f,d3			*Init C00000
Filc0:	move.l	d0,(a3)
	dbra	d3,Filc0
	move.l	(a5)+,(a4)
	moveq	#$13,d4			*Init C00000
Fillc1:	move.l	d0,(a3)
	dbra	d4,Fillc1
	moveq	#$03,d5			*Init C00011
Fillc2:	move.b	(a5)+,$0011(a3)
	dbra	d5,Fillc2
	move.w	d0,(a2)
	movem.l	(a6),d0-d7/a0-a6
	move	#$2700,sr
	tst.w	$00C00004
	jmp	SkipTable
Table:	dc.w	$8000,$3fff,$0100,$00a0,$0000,$00a1,$1100,$00a1
	dc.w	$1200,$00c0,$0000,$00c0,$0004,$0414,$302c,$0754
	dc.w	$0000,$0000,$0000,$812b,$0001,$0100,$00ff,$ff00
	dc.w	$0080,$4000,$0080,$af01,$d91f,$1127,$0021,$2600
	dc.w	$f977,$edb0,$dde1,$fde1,$ed47,$ed4f,$d1e1,$f108
	dc.w	$d9c1,$d1e1,$f1f9,$f3ed,$5636,$e9e9,$8104,$8f01
	dc.w	$c000,$0000,$4000,$0010,$9fbf,$dfff
SkipTable:
Waiting for fixed one.

Jorge Nuno
Very interested
Posts: 374
Joined: Mon Jun 11, 2007 3:09 am
Location: Azeitão, PT

Post by Jorge Nuno » Thu Jan 10, 2008 1:50 pm

Did it show the bios message?
Or you have no bios?

I'm trying to manually fix it... if that doesn't work then I will copy the init code

Rom sent...

HardWareMan
Very interested
Posts: 745
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Thu Jan 10, 2008 2:15 pm

Jorge Nuno wrote:Did it show the bios message?
Or you have no bios?
I'm trying to manually fix it... if that doesn't work then I will copy the init code
Rom sent...
I have an clone, that have no BIOS. That is correct, BIOS do init itself (TMSS), but most of clones have no BIOS. Second round...
***Not working. Can you just copy code above?
You even don't send "SEGA" in security register...

Code: Select all

move.l   #$53454741,$2f00(a1)   *Security code (SEGA) 

Jorge Nuno
Very interested
Posts: 374
Joined: Mon Jun 11, 2007 3:09 am
Location: Azeitão, PT

Post by Jorge Nuno » Thu Jan 10, 2008 2:31 pm

Code: Select all

START:
	NOP
	NOP
	MOVEA.l	#$A11100,		a0
	MOVE.b	-$10ff(a0),		d0
	ANDI.b	#$0f,			d0 
	MOVE.l	($000100),		$2F00(a0)
	BEQ 	Versao0
Versao0:
my first instructions...

I'm copying your code now...

EDIT: Done

LOL the BEQ should be after the ANDI, OMGLOL

HardWareMan
Very interested
Posts: 745
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Thu Jan 10, 2008 2:45 pm

OK, finally it works.

Jorge Nuno
Very interested
Posts: 374
Joined: Mon Jun 11, 2007 3:09 am
Location: Azeitão, PT

Post by Jorge Nuno » Thu Jan 10, 2008 2:46 pm

At last LOL, and the pins?

HardWareMan
Very interested
Posts: 745
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Thu Jan 10, 2008 2:55 pm

Jorge Nuno wrote:At last LOL, and the pins?
LOL. There (on [120-127]) really have an VIDEO. And it remind an index of color. But on [18-25] still quiet. Maybe its activated on CRAM loads?
By the way: pins actived only on "sky". On text no moves there.
What do you think?

Post Reply