Sega Genesis Dev Kit (SGDK)
Moderator: Stef
Re: Sega Genesis Dev Kit (SGDK)
I ported a couple projects to the latest SGDK. Just reporting that everything is working, thanks Stef!
The sprite list DMA is quite useful. The VDP_PLAN to PLAN changes were annoying, as was the disappearance of ResetSpritesDirect, but both were fast to work around.
			
			
									
						
										
						The sprite list DMA is quite useful. The VDP_PLAN to PLAN changes were annoying, as was the disappearance of ResetSpritesDirect, but both were fast to work around.
- 
				Stef
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Sega Genesis Dev Kit (SGDK)
Thanks for your feedback and confirming everything was alright 
I know some changes can be a bit annoying but they were for the best. Normally now the VDP sprites methods should be faster
			
			
									
						
										
						
I know some changes can be a bit annoying but they were for the best. Normally now the VDP sprites methods should be faster

Re: Sega Genesis Dev Kit (SGDK)
Please make smaller, focused commits. It's a pain to review 6000-line commits 
- why remove the 16 plain colors? I was using them, they were quite useful.
- the last commit seems to have a buggy word replacement (the #include guard got renamed to _H_)
			
			
									
						
										
						
- why remove the 16 plain colors? I was using them, they were quite useful.
- the last commit seems to have a buggy word replacement (the #include guard got renamed to _H_)
- 
				Stef
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Sega Genesis Dev Kit (SGDK)
I will try to keep commit smaller, but i have to admit and i'm not use to work like that.
I always wait to be in a stable state before doing commits, so that explains the big commits... but i agree, not very convenient to review them then.
I though the plain tiles weren't used... And that is still 15 extras tiles for something else.
But ok, if you were using it, i can reintroduce them, not a big deal
I fixed the XGM_H_ include guard, indeed wrong replace operation.
			
			
									
						
										
						I always wait to be in a stable state before doing commits, so that explains the big commits... but i agree, not very convenient to review them then.
I though the plain tiles weren't used... And that is still 15 extras tiles for something else.
But ok, if you were using it, i can reintroduce them, not a big deal

I fixed the XGM_H_ include guard, indeed wrong replace operation.
- 
				Stef
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Sega Genesis Dev Kit (SGDK)
Ok i've posted a 1.22a release to re introduce the 16 plains tiles, after all it doesn't ake a big difference and if it could be useful then better to keep them.
Here's the new SGDK 1.22a changelog:
			
			
									
						
										
						Here's the new SGDK 1.22a changelog:
Code: Select all
DOCUMENTATION
* minors improvements and fixes
COMPILER
* Rescomp: fixed a minor issue in sprite resource
* XGMTool:
 - added duration information to XD3 tag
 - improved loop
* added the XGM ROM builder tool.
* removed GenRes from makefile
LIBRARY
* Sprite Engine:
 - fixed sprite attribut update for non visible sprite
 - fixed sprite list update in certain condition
* Sound:
 - moved XGM driver method in a specific unit (xgm.c)
 - added XGM_getElapsed(..) method to retrieve elapsed XGM music playing time (in number of frame)
 - added XGM_setLoopNumber(..) to set the wanted number of loop in XGM music play.
 - added interrupt protection for Z80 access
* Maths:
 - reverted fix32Mul() and fix32Div() to previous version to avoid cumulative error
 - added getApproximatedLog2(..) method for fast Log2 calculation (approximated)
 - added getLog2Int(..) method for integer Log2 calculation
* Misc:
 - moved QSort methods to tools
 - added generic qsort with custom comparator callback
* VDP: more flexible VRAM tilemap configuration (window plan don't have to be first map).
* Bitmap mode: can now set bitmap mode in window plan
* changed to MIT license
* refactoring
SAMPLE
* Bench: added sprite donut animation test.Re: Sega Genesis Dev Kit (SGDK)
Please please please please support images under 15 colours lol so i don't have to hack my images to be full of black place holders 
			
			
									
						
										
						
- 
				Stef
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Sega Genesis Dev Kit (SGDK)
Updated to SGDK 1.30 !
This new version feature the new GCC 6.3 (thanks to Gligli for doing all the hard work !) providing better code generation and so better performance for your C code It also add some tweaks and sprite (Y) sorting to the sprite engine
 It also add some tweaks and sprite (Y) sorting to the sprite engine  Have fun !
 Have fun !
Download link : https://www.dropbox.com/s/b3rso72uousjk ... 30.7z?dl=0
Complete changelog :
			
			
									
						
										
						This new version feature the new GCC 6.3 (thanks to Gligli for doing all the hard work !) providing better code generation and so better performance for your C code
 It also add some tweaks and sprite (Y) sorting to the sprite engine
 It also add some tweaks and sprite (Y) sorting to the sprite engine  Have fun !
 Have fun !Download link : https://www.dropbox.com/s/b3rso72uousjk ... 30.7z?dl=0
Complete changelog :
DOCUMENTATION
* updated to last version
COMPILER
* Updated to GCC 6.3 (thanks a tons to Gligli for that !)
- many bugs fix and new features compared to old GCC 3.4.6
- much better assembly code generation
- added LTO (Linker Time Optimization) support
* Modified makefile to enable LTO and improve optimization level.
* Rescomp:
- updated to handle structure changes in the Sprite Engine.
LIBRARY
* DMA:
- minor optimization to DMA_queue(..) method (thanks to HpMan)
* Memory:
- default stack size increased to 0x800 bytes (GCC 6.3 requires more stack memory :p)
* Sprite Engine:
- added automatic Y sorting (per sprite)
- added SPR_sort(..) for generic sorting
- added SPR_sortOnY(..) for generic sorting
- by default now sprite visibility is set to always ON (faster than automatic visibility)
- updated 'Collision' structure (hierarchical structure)
- some changes to internal structures to provide better performance
* VDP BG/Tile:
- fixed a minor bug in VDP_setTileMapDataEx(..) and VDP_setTileMapDataRectEx(..) methods (thanks to Alekmaul for reporting it)
* minors fixes...
SAMPLE
* Bench:
- fixed math tests for GCC 6.3
Re: Sega Genesis Dev Kit (SGDK)
Was libres.h removed by accident?
			
			
									
						
										
						- 
				Stef
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Sega Genesis Dev Kit (SGDK)
Exactly, i just fixed the archive !
			
			
									
						
										
						Re: Sega Genesis Dev Kit (SGDK)
Nice  Thank you for getting the GCC6.3 toolchain integrated so quickly into the official version!
 Thank you for getting the GCC6.3 toolchain integrated so quickly into the official version!
By the way, I was able to use GDB 7.12.1 with BlastEM 0.5.0 from within netbeans, that I use as development environment. It's a bit odd to set up but it works!
			
			
									
						
										
						 Thank you for getting the GCC6.3 toolchain integrated so quickly into the official version!
 Thank you for getting the GCC6.3 toolchain integrated so quickly into the official version!By the way, I was able to use GDB 7.12.1 with BlastEM 0.5.0 from within netbeans, that I use as development environment. It's a bit odd to set up but it works!
Re: Sega Genesis Dev Kit (SGDK)
Not fixed in git?
			
			
									
						
										
						- 
				Stef
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Sega Genesis Dev Kit (SGDK)
@Gligli> Thanks to you for compiling the whole stuff and setup it in a way i could easily include it in SGDK 
About GDB, good to have this information ! I think Code::blocks is the responsible of all my troubles with it. I will do some tests outside Code::blocks to see how it behaves
@cero> nope as i don't have access it it from here but i will do it when i'll be back at home.
			
			
									
						
										
						
About GDB, good to have this information ! I think Code::blocks is the responsible of all my troubles with it. I will do some tests outside Code::blocks to see how it behaves

@cero> nope as i don't have access it it from here but i will do it when i'll be back at home.
Re: Sega Genesis Dev Kit (SGDK)
Really cool stuff with the LTO, seems to work fine with Gendev as well with -flto/-fuse-linker-plugin.
For those who still want to generate a symbol table:
And if you hate changing version numbers:
			
			
									
						
										
						For those who still want to generate a symbol table:
Code: Select all
PLUGIN=$(GENDEV)/m68k-elf/libexec/gcc/m68k-elf/6.3.0
symbol.txt: MYROM.bin
	$(NM) --plugin=$(PLUGIN)/liblto_plugin.so -n MYROM.elf > symbol.txt
Code: Select all
GENGCC_VER := $(shell $(CC) -dumpversion)
PLUGIN=$(GENDEV)/m68k-elf/libexec/gcc/m68k-elf/$(GENGCC_VER)
Re: Sega Genesis Dev Kit (SGDK)
I'm getting an error on compile: (.text+0x1c): undefined reference to `_hard_reset'
I read something vaguely about this further back in the thread. Has it been fixed?
I'm using version 130.
			
			
									
						
										
						I read something vaguely about this further back in the thread. Has it been fixed?
I'm using version 130.
Re: Sega Genesis Dev Kit (SGDK)
Overwrite your old sega.s with the new one in 1.2+