Search found 338 matches

by cero
Mon Jul 04, 2016 6:16 pm
Forum: SGDK
Topic: Sega Genesis Dev Kit (SGDK)
Replies: 852
Views: 1159190

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.
by cero
Tue Jun 28, 2016 5:52 pm
Forum: SGDK
Topic: What do you use for sorting?
Replies: 15
Views: 10526

Re: What do you use for sorting?

Here's the FreeBSD original source: https://github.com/oza/FreeBSD-8.0-dyntick/blob/master/sys/libkern/qsort.c It works using pointers, so the multiplication and division are necessary to work with objects of arbitrary size. Edit: I didn't know sgdk had a sorting function already, but sorting an arr...
by cero
Tue Jun 28, 2016 12:07 pm
Forum: SGDK
Topic: What do you use for sorting?
Replies: 15
Views: 10526

Re: What do you use for sorting?

Inlining the comparison function sped it up by 25%. Now it's at quite an acceptable speed.
by cero
Tue Jun 28, 2016 11:54 am
Forum: SGDK
Topic: What do you use for sorting?
Replies: 15
Views: 10526

Re: What do you use for sorting?

Optimized it by removing 32-bit divides and multiplies, now it's 1/6 frame. I can post this version if you want it for SGDK Stef?
by cero
Tue Jun 28, 2016 11:12 am
Forum: SGDK
Topic: What do you use for sorting?
Replies: 15
Views: 10526

Re: What do you use for sorting?

FreeBSD's was almost line-for-line identical to newlib's, but it only took 1/4 frame, most likely because I use -O3 and newlib used -O2.
by cero
Tue Jun 28, 2016 10:54 am
Forum: SGDK
Topic: What do you use for sorting?
Replies: 15
Views: 10526

Re: What do you use for sorting?

Musl's qsort was even slower than newlib's. Next trying freebsd's.

It's not really the same work, because all objects move, and so their order will change frame to frame.
by cero
Tue Jun 28, 2016 8:05 am
Forum: SGDK
Topic: What do you use for sorting?
Replies: 15
Views: 10526

Re: What do you use for sorting?

I believe adding complex heap code to sort 16 sprites is slightly overkill :P
by cero
Mon Jun 27, 2016 5:38 pm
Forum: SGDK
Topic: What do you use for sorting?
Replies: 15
Views: 10526

What do you use for sorting?

I have some sprites I need sorted by Y to appear in proper Z order. Using the supplied newlib's qsort works, but it takes half a frame for an array of 16 sprites, astoundingly inefficient.

I was thinking about copying musl's qsort into the project, and inlining the comparison. What do others use?
by cero
Thu Jun 23, 2016 4:08 pm
Forum: SGDK
Topic: programming noob, hi forums! Advice please!
Replies: 17
Views: 11719

Re: programming noob, hi forums! Advice please!

It's about the same difficulty to develop for. You'd still need to learn C, or another proper language.
by cero
Fri Jun 17, 2016 10:38 am
Forum: SGDK
Topic: About the SGDK license
Replies: 1
Views: 2093

About the SGDK license

Stef, I believe you intended to use LGPL to receive modifications for SGDK only. However, as is, all programs using SGDK without being LGPL-compatible are infringing. This is because Gen programs are statically linked, and static linking is a derivative work unless otherwise noted. It would be good ...
by cero
Wed Jun 15, 2016 5:15 pm
Forum: Megadrive/Genesis
Topic: Dump of the D-CAT16 handheld (Firecore)
Replies: 16
Views: 21037

Re: Dump of the D-CAT16 handheld (Firecore)

Wait, it's a 12$ handheld with extended ROMs, that says it supports Gen roms on the SD card? Pretty damn cheap.
by cero
Wed Jun 15, 2016 10:22 am
Forum: SGDK
Topic: programming noob, hi forums! Advice please!
Replies: 17
Views: 11719

Re: programming noob, hi forums! Advice please!

Not at all, the MD is very low end hardware. I cannot for the life of me think that GCC has improved that much for 68K targets since the mid 90s - why would it? Perhaps not the backend, but certainly the frontend. I'm pretty sure I could get LTO working, for one. It can do transformations that gcc ...
by cero
Tue Jun 14, 2016 6:10 pm
Forum: SGDK
Topic: programming noob, hi forums! Advice please!
Replies: 17
Views: 11719

Re: programming noob, hi forums! Advice please!

TBH, the reason for 98% of them being in asm is that compilers in 1990 sucked. You now have access to the latest gcc, so little reason to write asm unless you hit performance bottlenecks.
by cero
Mon Jun 13, 2016 9:11 am
Forum: SGDK
Topic: programming noob, hi forums! Advice please!
Replies: 17
Views: 11719

Re: programming noob, hi forums! Advice please!

This isn't what you want to hear, but you really should learn C properly before trying to do "the fun parts". You won't get far just modifying someone else's colored block sidescroller.
by cero
Sun Jun 05, 2016 8:25 am
Forum: Demos
Topic: Space Hawks - Sega Megadrive unofficial port
Replies: 15
Views: 16590

Re: Space Hawks - Sega Megadrive unofficial port

Yes to both. However, many authors and companies won't bother to sue until the infringement turns commercial.