Search found 64 matches

by Grind
Fri Sep 01, 2017 2:17 pm
Forum: SGDK
Topic: Rescomp in CodeBlocks
Replies: 2
Views: 723

Re: Rescomp in CodeBlocks

It creates a tileset and tilemap, and in your case looks like it compresses both.
by Grind
Wed Aug 23, 2017 5:12 pm
Forum: Tools
Topic: Update your Genesis/32X Toolchain!
Replies: 108
Views: 46117

Re: Update your Genesis/32X Toolchain!

Here's what I do. Make a global byte somewhere in the assembly where you declare your variables (pasting this before ".section.keepboot" in sega.s will work). .section .data .globl vblank vblank: ds.b 1 Point the VInt vector to this. All it does is clear the byte. VerticalInt: clr.b (vblank) rte The...
by Grind
Mon Aug 21, 2017 2:56 pm
Forum: Super 32X
Topic: GCC 7
Replies: 3
Views: 1511

Re: GCC 7

Well apparently, --disable-multilib was what I was missing. Thanks for the link, forgot Saturn had one of those things too.
by Grind
Mon Aug 21, 2017 11:48 am
Forum: Super 32X
Topic: GCC 7
Replies: 3
Views: 1511

GCC 7

I'm having some issues getting any GCC newer than 4.x to build libgcc for SH. Gendev also had this issue if you tried to use a newer GCC than it used (4.8.6 I think) back when it supported 32X. The error: /home/grind/marsdev/toolchain/gcc-7.2.0/build/./gcc/xgcc -B/home/grind/marsdev/toolchain/gcc-7....
by Grind
Tue Aug 15, 2017 3:47 pm
Forum: SGDK
Topic: Sega Genesis Dev Kit (SGDK)
Replies: 789
Views: 361191

Re: Sega Genesis Dev Kit (SGDK)

Overwrite your old sega.s with the new one in 1.2+
by Grind
Fri Jun 23, 2017 2:31 pm
Forum: SGDK
Topic: SPRITES
Replies: 15
Views: 2966

Re: SPRITES

Do you have an include for "name_of_res_file.h"? Rescomp generates that header based on the .res.
by Grind
Mon Jun 19, 2017 5:26 pm
Forum: SGDK
Topic: Sega Genesis Dev Kit (SGDK)
Replies: 789
Views: 361191

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: 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 A...
by Grind
Wed Apr 19, 2017 11:57 am
Forum: SGDK
Topic: ROM vs RAM
Replies: 2
Views: 705

Re: ROM vs RAM

All global variables are loaded into RAM unless they are declared const. If you are using SGDK the boot/sega.s file loads that stuff for you on startup or a hard reset. I've never had to modify a SpriteDefinition, which rescomp creates as const (so ROM). There is probably a much better way to do wha...
by Grind
Sun Nov 06, 2016 12:01 am
Forum: SGDK
Topic: Starting a fade in/out sometimes crashes on hardware
Replies: 9
Views: 1489

Re: Starting a fade in/out sometimes crashes on hardware

Oh I see, I misunderstood how VDP_waitVSync works. I thought disabling interrupts might make it loop indefinitely, but the vblank flag it checks seems to be changed regardless.
by Grind
Sat Nov 05, 2016 8:39 pm
Forum: SGDK
Topic: Starting a fade in/out sometimes crashes on hardware
Replies: 9
Views: 1489

Re: Starting a fade in/out sometimes crashes on hardware

I tried putting this into my title screen loop, and it doesn't seem to freeze the game at all (ate controller inputs though). SYS_disableInts(); VDP_waitVSync(); VDP_waitVSync seems to re-enable interrupts (or at least just VInt), so maybe it would be just fine to leave it the way it is, and call SY...
by Grind
Sat Nov 05, 2016 3:52 pm
Forum: SGDK
Topic: Starting a fade in/out sometimes crashes on hardware
Replies: 9
Views: 1489

Starting a fade in/out sometimes crashes on hardware

I had an issue in my project for a while where the game would hang between room transitions (fading). It would only happen on hardware, not emulators (except BlastEm) which reported Read from VDP data port while writes are configured, CPU is now frozen. VDP Address: 2, CD: 5 it looks like the proble...
by Grind
Fri Nov 04, 2016 11:55 pm
Forum: Megadrive/Genesis
Topic: Collision Help Please...
Replies: 12
Views: 3402

Re: Collision Help Please...

Here is the usual algorithm for detecting if 2 rectangles overlap: if (RectA.X1 < RectB.X2 && RectA.X2 > RectB.X1 && RectA.Y1 < RectB.Y2 && RectA.Y2 > RectB.Y1) Your code is not taking the size of the rectangles into consideration, so the function will only set "Overlap" to true if the 2 sprites are...
by Grind
Mon Oct 17, 2016 11:39 am
Forum: SGDK
Topic: SGDKcompiling Issue -RESOLVED-
Replies: 5
Views: 1590

Re: SGDKcompiling Issue

Does the GDK environment variable end with a forward slash '/'?

And also GDK_WIN with a backwards slash '\'?

It looks like the tool is not adding an extra slash to the end when one doesn't already exist in the variable.
by Grind
Fri Oct 07, 2016 1:44 pm
Forum: Tools
Topic: 68000 instruction timing from source?
Replies: 14
Views: 2934

Re: 68000 instruction timing from source?

ehaliewicz wrote:What you really want is some sort of profiler.
As far as I know the closest thing gennydev has to profiling is random gdb pausing and timing with Kdebug.

I hope I'm wrong though.
by Grind
Thu Oct 06, 2016 10:25 pm
Forum: SGDK
Topic: find how many times a number appears inside a number
Replies: 2
Views: 695

Re: find how many times a number appears inside a number

the modulus opoerator won't work right with fixed point numbers, have to convert to int first.