Sega Genesis Dev Kit (SGDK)

SGDK only sub forum

Moderator: Stef

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

Re: Sega Genesis Dev Kit (SGDK)

Post by cero » Mon Jul 04, 2016 6:16 pm

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.

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

Re: Sega Genesis Dev Kit (SGDK)

Post by Stef » Mon Jul 04, 2016 8:39 pm

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 :-)

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

Re: Sega Genesis Dev Kit (SGDK)

Post by cero » Wed Sep 21, 2016 8:42 am

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_)

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

Re: Sega Genesis Dev Kit (SGDK)

Post by Stef » Wed Sep 21, 2016 7:16 pm

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.

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

Re: Sega Genesis Dev Kit (SGDK)

Post by Stef » Wed Sep 21, 2016 7:36 pm

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:

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.

matteus
Very interested
Posts: 336
Joined: Mon Feb 04, 2008 1:41 pm

Re: Sega Genesis Dev Kit (SGDK)

Post by matteus » Mon Sep 26, 2016 9:12 pm

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 :D

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

Re: Sega Genesis Dev Kit (SGDK)

Post by Stef » Sun Jun 18, 2017 11:19 pm

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 :) 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

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

Re: Sega Genesis Dev Kit (SGDK)

Post by cero » Mon Jun 19, 2017 10:50 am

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)

Post by Stef » Mon Jun 19, 2017 11:24 am

Exactly, i just fixed the archive !

gligli
Newbie
Posts: 8
Joined: Thu Jun 08, 2017 7:46 am
Location: Lyon / France
Contact:

Re: Sega Genesis Dev Kit (SGDK)

Post by gligli » Mon Jun 19, 2017 11:58 am

Nice :) 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!

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

Re: Sega Genesis Dev Kit (SGDK)

Post by cero » Mon Jun 19, 2017 4:13 pm

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)

Post by Stef » Mon Jun 19, 2017 4:19 pm

@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.

Grind
Very interested
Posts: 69
Joined: Fri Jun 13, 2014 1:26 pm
Location: US
Contact:

Re: Sega Genesis Dev Kit (SGDK)

Post by Grind » Mon Jun 19, 2017 5:26 pm

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:

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
And if you hate changing version numbers:

Code: Select all

GENGCC_VER := $(shell $(CC) -dumpversion)
PLUGIN=$(GENDEV)/m68k-elf/libexec/gcc/m68k-elf/$(GENGCC_VER)

matteus
Very interested
Posts: 336
Joined: Mon Feb 04, 2008 1:41 pm

Re: Sega Genesis Dev Kit (SGDK)

Post by matteus » Tue Aug 15, 2017 3:27 pm

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.

Grind
Very interested
Posts: 69
Joined: Fri Jun 13, 2014 1:26 pm
Location: US
Contact:

Re: Sega Genesis Dev Kit (SGDK)

Post by Grind » Tue Aug 15, 2017 3:47 pm

Overwrite your old sega.s with the new one in 1.2+

Post Reply