HomeForumsWhat's newResources 
 
 
SGL replacement
RockinB - Feb 26, 2006

 1  2  Next> 

 RockinB Feb 26, 2006
EDIT 2006-03-01: screenshots updated(see also this post...), new functions:

slSpriteCCalcNum, slSpriteCCalcCond, slSpriteColMode, slSpriteType, sl1MapRA, sl1MapRB, slPageRbg0, slCharRbg0, sl16MapRA, sl16MapRB

slBitMapRbg0, slInitBitMap, slBitMapBase, slBMPalette

slLocateBitMap, slClearBitMap, slBMPset, slBMPoint, slBMBox, slBMBoxFill, slBMGet, slBMPut, slBMSprPut


EDIT 2006-03-21: new functions:

slBMCircle, slBMLine, slPrintMatrix, slLocateNbg (slLocateNbg0, slLocateNbg1, slLocateNbg2, slLocateNbg3)

slLocatePage, slExtSignal, slScrTransparent, slBackColTable, slLineColTable, slLine1ColSet

slLineColDisp, slColorCalc, slColorCalcOn, slColOffsetOn, slColOffsetOff, slColOffsetAUse, slColOffsetBUse, slColOffsetA, slColOffsetB


Hi everyone,

I've been working on a SGL replacement recently. I started with Charles MacDonalds examples which don't use any SEGA library, used portions of it in wrappers and re-implemented a subset of SGL functions.

sl16MapRA, sl16MapRB, sl1MapRA, sl1MapRB, slBack1ColSet, slBackColTable, slBitMapBase, slBitMapNbg0, slBitMapNbg1, slBitMapRbg0, slBMBox, slBMBoxFill, slBMCircle, slBMGet, slBMLine, slBMPalette, slBMPoint, slBMPset, slBMPut, slBMSprPut, slCharNbg0, slCharNbg1, slCharNbg2, slCharNbg3, slCharRbg0, slClearBitMap, slColorCalc, slColorCalcOn, slColOffsetA, slColOffsetB, slColOffsetAUse, slColOffsetBUse, slColOffsetOff, slColOffsetOn, slColRAMMode, slDispHex, slDispSprite, slDMACopy, slExtSignal, slGetHCount, slGetVCount, slInitBitMap, slInitSystem, slLine1ColSet, slLineColDisp, slLineColTable, slLocate, slLocateBitMap, slLocateNbg (slLocateNbg0, slLocateNbg1, slLocateNbg2, slLocateNbg3), slLocatePage, slMapNbg0, slMapNbg1, slMapNbg2, slMapNbg3, slPageNbg0, slPageNbg1, slPageNbg2, slPageNbg3, slPageRbg0, slPlaneNbg0, slPlaneNbg1, slPlaneNbg2, slPlaneNbg3, slPlaneRA, slPlaneRB, slPrint, slPrintFX, slPrintHex, slPrintMatrix, slPriority, slSpriteCCalcCond, slSpriteCCalcNum, slSpriteColMode, slSpriteType, slSynch, slTVOff, slTVOn, slVRAMMode, slScrAutoDisp, slScrCycleSet, slScrDisp, slScrPosNbg0, slScrPosNbg1, slScrPosNbg2, slScrPosNbg3, slScrTransparent, slZoomMode, slZoomNbg0, slZoomNbg1

It does already work with a few simple SGL games. But there's much work ahead (debugging).

I hope to be able to use it in some of my Saturn homebrew and to take advantage from the possibilities involved in the fact that the source code is available.

Website: www.rockin-b.de/saturn-sglrep.html...

Please let me know what you think! And considering the fact that I'm not an expert in programing without SEGA libs, I'd welcome anyone who would like to help implementing or debugging. Actually, I expect nothing less.

Some screenshots to compare:

(with SGL) (with SGL replacement)








 slinga Feb 26, 2006
From your site: "It is created in the intention to allow certain Saturn homebrew applications to work just as if they were using the original SGL."

Amazing stuff, but why bother? The SGL is a pain to work with, poorly documented, some stuff just don't work, etc. This is a hard project you've undertaken and I think you'd be better served writing your own library that does things it's own ways then trying to perserve compatibility with existing Saturn homebrew applications. It's not like there's not that many homebrews out there (probably less than 20).

 RockinB Feb 26, 2006

  
	
	
Originally posted by slinga+Sun, 2006-02-26 @ 04:28 PM-->
QUOTE(slinga @ Sun, 2006-02-26 @ 04:28 PM)
From your site: "It is created in the intention to allow certain Saturn homebrew applications to work just as if they were using the original SGL."

Amazing stuff, but why bother? The SGL is a pain to work with, poorly documented, some stuff just don't work, etc.

[post=144714]Quoted post[/post]

[/b]



I disagree, the SGL has been very useful for me. Documentation can be improved by translating newer japanese docs.


  
	
	
Originally posted by slinga@Sun, 2006-02-26 @ 04:28 PM

This is a hard project you've undertaken

[post=144714]Quoted post[/post]



Actually I don't intent this project getting hard, as I don't want to recode the entire SGL, only most common used functions. And as far as available, I'd like to use existing code.

QUOTE(ExCyber @ Sun, 2006-02-26 @ 07:40 PM)
Hmm... this should be enough to rebuild arflash... as far as I remember I only used slSynch, slPrint, and slPrintHex.

[post=144720]Quoted post[/post]

[/b]



I haven't tried, but I'm sure it'll work.

QUOTE(Piratero @ Fri, 2006-03-03 @ 12:09 AM)
Would you actually replace a few tedious functions from the original SGL/SBL or try to keep it as 1:1 as possible?

[post=144832]Quoted post[/post]

[/b]



About the most sophisticated SGL features like real time gouraud, depth cueing and so on, I don't know if they'll ever come. The rather easy stuff comes first and I already implemented a lot of functions that I don't use in my homebrew.

When it can be done better like possibly in the bitmap functions I'm currently working on, then I might add some compile flags to activate the improvements, as long as they need more cpu power, more space or if the original SGL behaviour could be of any use. Otherwise I could make the improvements default.


  
	
	
Originally posted by Piratero@Fri, 2006-03-03 @ 12:09 AM

I'd like to see some ideas from SBL to be integrated into SGL.
[post=144832]Quoted post[/post]



Which one, please tell me.