Sega Genesis Dev Kit (SGDK)

SGDK only sub forum

Moderator: Stef

lingh
Interested
Posts: 20
Joined: Thu Sep 06, 2012 4:57 am

Post by lingh »

Can somebody post example of smooth, endless vertical scrolling of plane (a or b) at 1px per frame?

I'm going crazy, can't pull it off.
djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch »

lingh wrote:Can somebody post example of smooth, endless vertical scrolling of plane (a or b) at 1px per frame?

I'm going crazy, can't pull it off.
Hi there!

It's probably overkill but the Propeller engine might be something of interest to you.

viewtopic.php?t=1373
lingh
Interested
Posts: 20
Joined: Thu Sep 06, 2012 4:57 am

Post by lingh »

djcouchycouch, yep, overkill.

I want basic example, which you can port to your project or compile and quickly test on hardware.

--

False alarm.
Seems to be VSync problems, that's why I have tiny shutters.

Enable it in emulator - all ok. On TV it is also scrolls smooth.
ehaliewicz
Very interested
Posts: 50
Joined: Tue Dec 24, 2013 1:00 am

Post by ehaliewicz »

Is there anything in particular that prevents sgdk from working properly on Linux or OSX if I swap out the gcc/ld binaries?

I'm guessing some of the tools are windows only, and I might need to tweak the makefiles, but other than that?
kubilus1
Very interested
Posts: 237
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Post by kubilus1 »

You will need gcc compiled for 68k development, some other tools and Makefile changes, etc. This is all already done for Linux, including SGDK here:
https://code.google.com/p/gendev/

And some forum posts:
viewtopic.php?t=1248
ehaliewicz
Very interested
Posts: 50
Joined: Tue Dec 24, 2013 1:00 am

Post by ehaliewicz »

kubilus1 wrote:You will need gcc compiled for 68k development, some other tools and Makefile changes, etc. This is all already done for Linux, including SGDK here:
https://code.google.com/p/gendev/

And some forum posts:
viewtopic.php?t=1248
Oh, awesome, now I don't have to reboot to windows everytime I work on my game.

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

Post by Stef »

Updated to version 0.95 ! Get it from here
nolddor
Very interested
Posts: 102
Joined: Sun Jun 02, 2013 1:35 pm
Location: Spain

Post by nolddor »

Hi Stef, Thank a lot for the new version

In FONT.H line 19

#include "libres.h" --> Missing

The file should be auto generated by rescomp. Be sure to recompile the whole project. Maybe i made a mistake in the order of object file generation, i will check that ;)
Mixail
Very interested
Posts: 133
Joined: Thu Nov 18, 2010 4:47 pm

Post by Mixail »

Good job!
Stef, It is possible to see GFX compression support example?
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef »

The "sprite" sample use it in a very transparent fashion. You basically just need to declare your image in resource file with compression parameter and that is done. Then you have all the tools.h file to handle manually decompression but if you use advanced method as VDP_drawImage(..) or VDP_drawImageEx(..) SGDK will handle it by itself (same for the new TileCache feature).
nolddor
Very interested
Posts: 102
Joined: Sun Jun 02, 2013 1:35 pm
Location: Spain

Post by nolddor »

OK thank you, I've deleted the 'out' folder and I've compiled the whole project but the error appears again...
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef »

Well i don't have any problem here and the makefile looks ok. Can you post your compilation log ? the libres.h file should be generate automatically in the res folder.
nolddor
Very interested
Posts: 102
Joined: Sun Jun 02, 2013 1:35 pm
Location: Spain

Post by nolddor »

But,... Do I need create a res folder into my project folder?

Code: Select all

-------------- Build: default in Project zDX (compiler: Sega MegaDrive)---------------

Running command: make.exe -f C:\sgdk\makefile.gen default
c:/sgdk/bin/mkdir -p out
c:/sgdk/bin/gcc  -m68000 -Wall -O1 -fomit-frame-pointer -fno-builtin-memset -fno-builtin-memcpy -Iinc -Isrc -Ires -Ic:/sgdk/inc -Ic:/sgdk/res -Bc:/sgdk/bin -c c:/sgdk/src/boot/rom_head.c -o out/rom_head.o
c:/sgdk/bin/ld -T c:/sgdk/md.ld -nostdlib --oformat binary -o out/rom_head.bin out/rom_head.o
c:/sgdk/bin/mkdir -p out
c:/sgdk/bin/gcc  -m68000 -Wall -O1 -fomit-frame-pointer -fno-builtin-memset -fno-builtin-memcpy -Iinc -Isrc -Ires -Ic:/sgdk/inc -Ic:/sgdk/res -Bc:/sgdk/bin -c c:/sgdk/src/boot/sega.s -o out/sega.o
c:/sgdk/bin/mkdir -p out
c:/sgdk/bin/mkdir -p out/src
c:/sgdk/bin/mkdir -p out/res
c:/sgdk/bin/gcc  -m68000 -Wall -O1 -fomit-frame-pointer -fno-builtin-memset -fno-builtin-memcpy -Iinc -Isrc -Ires -Ic:/sgdk/inc -Ic:/sgdk/res -Bc:/sgdk/bin -c gfx.c -o out/gfx.o
In file included from c:/sgdk/inc/genesis.h:14,
                 from main.h:5,
                 from gfx.h:5,
                 from gfx.c:1:
c:/sgdk/inc/font.h:19:20: libres.h: No such file or directory
make: *** [out/gfx.o] Error 1
Process terminated with status 2 (0 minute(s), 1 second(s))
1 error(s), 0 warning(s) (0 minute(s), 1 second(s))
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef »

Oh it looks like you are using the wrong makefile :p
makefile.gen is supposed to compile your project while you need to use makelib.gen to recompile the library itself ;)
nolddor
Very interested
Posts: 102
Joined: Sun Jun 02, 2013 1:35 pm
Location: Spain

Post by nolddor »

Thank a lot, Works fine yet!
Post Reply