stephane-d / sgdk Goto Github PK
View Code? Open in Web Editor NEWSGDK - A free and open development kit for the Sega Mega Drive
Home Page: https://www.patreon.com/SGDK
License: MIT License
SGDK - A free and open development kit for the Sega Mega Drive
Home Page: https://www.patreon.com/SGDK
License: MIT License
What steps will reproduce the problem?
1. Configure environment
(https://code.google.com/p/sgdk/wiki/UseSGDKWithEclipse)
2. Checkout SDK from trunk.
3. Create "Hello world" example and try to build.
What is the expected output? What do you see instead?
Expected result: Application is compiled.
Actual result: Error "make: *** No rule to make target
`C:/sega/sdk/lib/libmd.a', needed by `out/rom.out'. Stop."
What version of the product are you using? On what operating system?
SDK from trunk
Original issue reported on code.google.com by [email protected]
on 26 Apr 2013 at 10:54
The RGB24_TO_VDPCOLOR macro is BGR, nor RGB.
VDP_setPaletteColor(63, RGB24_TO_VDPCOLOR(0xff0000));
sets the color to blue, even though it should be red.
The attached file crashes wavtoraw. It's straight exported from Audacity at 16Khz and 8-bit unsigned.
Valgrind log:
==4496== Command: /tmp/wavtoraw /tmp/bug.wav bug.tmp 16000
==4496==
==4496== Conditional jump or move depends on uninitialised value(s)
==4496== at 0x400B1B: main (wavtoraw.c:68)
==4496==
==4496== Conditional jump or move depends on uninitialised value(s)
==4496== at 0x400C36: main (wavtoraw.c:93)
==4496==
==4496== Conditional jump or move depends on uninitialised value(s)
==4496== at 0x400C82: main (wavtoraw.c:99)
==4496==
==4496== Conditional jump or move depends on uninitialised value(s)
==4496== at 0x400CB0: main (wavtoraw.c:105)
==4496==
==4496== Conditional jump or move depends on uninitialised value(s)
==4496== at 0x400D70: main (wavtoraw.c:99)
==4496==
==4496== Use of uninitialised value of size 8
==4496== at 0x400DAD: main (wavtoraw.c:129)
==4496==
The line numbers are offset by 2, because I had to add a #define _GNU_SOURCE on top, to fix a warning about round().
The file is named PDF because github didn't allow uploading wavs, just rename to wav.
Use:
SHELL?=$(BIN)/sh
RM?= $(BIN)/rm
AR?= $(BIN)/ar
CC?= $(BIN)/gcc
LD?= $(BIN)/ld
Instead of:
SHELL=$(BIN)/sh
RM= $(BIN)/rm
AR= $(BIN)/ar
CC= $(BIN)/gcc
LD= $(BIN)/ld
Original issue reported on code.google.com by Stephane.D
on 31 Jul 2013 at 7:49
It would be nice to have a method as VDP_compactVRAM() or VDP_setupVRAM() which automatically set the VRAM maps address (PLAN_A, PLAN_B and WINDOW), Sprite Table and HScroll Table addresses depenginto allocate maps / sat data depending the current plan size information.
The attached wav file plays badly on the 4PCM_ENV driver, it crackles. The format is fine, as it's already 8-bit mono 16kHz, and it sounds perfect when player on a computer.
It plays perfect in both mplayer and aplay, the latter confirms there is no advanced filtering in play. So either there is an issue in the 4PCM driver's mixing or interpolating algorithms, or in wavtoraw.
Hi,
I've just written a guide on how to use SGDK with QtCreator (my IDE of choice),
with images.
It's available at
https://github.com/AbigailBuccaneer/sgdk/wiki/sgdk-with-qtcreator - it's public
domain, so feel free to copy it over to this wiki, or do whatever you want with
it.
Thanks for the tools :)
--Abigail
Original issue reported on code.google.com by [email protected]
on 9 Jan 2015 at 2:45
Try to do a VRAM Copy DMA operation actually fails when done on the real
hardware.
Original issue reported on code.google.com by Stephane.D
on 9 May 2014 at 6:35
Add SR control in SGDK.
Should be already done but verify it.
Original issue reported on code.google.com by Stephane.D
on 25 May 2012 at 10:00
Here is the format description :
.pal Paint Shop Pro colour palette file:
Contains the colour palette table saved from a 16 or 256 colour image. It can
be loaded for another image and this provides a means of copying colour
palettes from one image to another.
These files are text editable. The format of the file is as follows:
- The first line contains the header "JASC-PAL" (without the quotes).
- The second line contains the palette file version. For example "0100"
(without the quotes)
- The third line contains the number of colours, either 16 or 256.
- Subsequent lines contain the Red, Green and Blue components of each palette
entry, with a space between each of the Red, Green and Blue numbers. These
numbers are in decimal, so each attribute should be in the range 0 to 255.
Original issue reported on code.google.com by Stephane.D
on 16 Jun 2014 at 8:54
Using fading method on palette != PAL0 result in some unexpected results.
For instance VDP_fadePalOut(PAL1, ...) doesn't work correctly.
Original issue reported on code.google.com by Stephane.D
on 31 May 2013 at 8:50
"gcc is not found in $PATH""
I think using Release 3.7.0 of eclipse.. i dont know how to do this step too :
.... rebuild the index
... On Make Target view, create a new target for your project. ...
Please Help me
Greetings From A Brasilian Fan!!!
Original issue reported on code.google.com by [email protected]
on 31 Oct 2011 at 6:15
The RLE compression return corrupted image sometime.
Original issue reported on code.google.com by Stephane.D
on 2 Jun 2014 at 3:35
Just add HV counter in the seed number, take care of not having any sync before
it.
Original issue reported on code.google.com by Stephane.D
on 10 Jul 2013 at 9:25
Could be interesting to add VDP_drawNum() and VDP_drawNumBG(), joining
VDP_drawText() and IntToStr() to write numbers directly on screen using these
functions.
Original issue reported on code.google.com by [email protected]
on 25 Jun 2014 at 8:30
Hi. A while back (before SGDK moved from Google Code to GitHub) I wrote the instructions for using QtCreator with SGDK, and put them in the wiki of my own GitHub exported version of SGDK.
Now SGDK's officially on GitHub, but the QtCreator pages are still on my wiki. I don't have any plans to maintain them so it makes no sense for them to be on my version of the SGDK repository (which I was about to delete, before I remembered the QtCreator docs).
I've just updated my version's wiki's master
branch to be ahead of yours and merge in the QtCreator info.
Please merge https://github.com/AbigailBuccaneer/sgdk.wiki.git
into https://github.com/Stephane-D/SGDK.wiki.git
. It should be a simple fast-forward merge.
There are 4 arguments and I think that it needs to be the latter function?
Also will the documentation be included on Github?
Hi, rescomp readme is wrong:
Collision should be set to box by default:
https://github.com/Stephane-D/SGDK/blob/master/tools/rescomp/rescomp.txt#L143
but:
SGDK/tools/rescomp/src/sprite.c
Line 72 in 10f2039
Update tutorial to reflct last SGDK version.
Original issue reported on code.google.com by Stephane.D
on 30 May 2012 at 10:31
I'm trying to make a simple "Snake" game, where I control a sprite which is represented by a block.
If I'm going horizontally right- then I increment the sprite.posx by + 8. It will reach 384 (sometimes only 376 if I frame step slowly) but the next position is 128.
It does not do this vertically, instead when doing sprite.posy + 8, it will reach 1016 and reset to 0.
Is the sprite area not defined to be 512x512 starting at 128,128?
I've got these values using GensKmod, but I get the same behaviour in Fusion.
My code looks like this:
while(1)
{
if (count > 5) {
switch (steer) { // I change steer elsewhere
case up:
snakeSprite->posy = snakeSprite->posy - 8;
direction = up;
break;
case down:
snakeSprite->posy = snakeSprite->posy + 8;
direction = down;
break;
case left:
snakeSprite->posx = snakeSprite->posx - 8;
direction = left;
break;
case right:
snakeSprite->posx = snakeSprite->posx + 8;
direction = right;
break;
}
count = 0;
}
else count++;
VDP_setSpriteP(0, &snakeSprite);
VDP_updateSprites();
VDP_waitVSync();
}
Any advice you could give would be appreciated.
Would be better to copy sega.s and romhead.c in project folder then compile
them.
Original issue reported on code.google.com by Stephane.D
on 31 Jul 2014 at 5:52
The moon display tutorial does not work anymore because of the
VDP_loadBMPTileData which seems to be broken when tile index destination is not
aligned on 32.
Also check the default plan initialization...
Original issue reported on code.google.com by Stephane.D
on 30 May 2012 at 9:39
What steps will reproduce the problem?
1. Configure Eclipse with https://code.google.com/p/sgdk/wiki/UseSGDKWithEclipse
2. Compile any example from "sample" directory.
What is the expected output? What do you see instead?
Expected result: Image isn't duplicated.
Actual result: Image is duplicated.
Please see attachment (duplicated_image.PNG).
Original issue reported on code.google.com by [email protected]
on 26 Apr 2013 at 11:36
Attachments:
Hello,
Was building with gendev and ran into this.
In file included from src/xgmtool.c:8:0:
src/../inc/vgm.h:6:17: fatal error: gd3.h: No such file or directory
#include "gd3.h"
^
The code blocks project file has a reference to this header, so just forgot to commit it I think.
It can be useful to know the visibility state of a sprite so move that :
in sprite_eng.h file :)
What steps will reproduce the problem?
1. Build sgdk file that includes both "genesis.h" and <stdio.h>
2.
3.
What is the expected output?
Compilation should be successful.
What do you see instead?
Compilation fails with the following:
"""
/opt/toolchains/gen/m68k-elf/lib/gcc/m68k-elf/4.5.2/include/stddef.h:211:23:
error: conflicting types for ‘size_t’
/opt/toolchains/gen/m68k-elf/include/types.h:160:22: note: previous declaration
of ‘size_t’ was here
"""
The file stddef.h checks for the prior definition of __size_t which is not
defined in types.h. Defining this fixes the issue. Here is the patch:
{{{
--- types.h.orig 2012-12-12 16:36:39.734989382 -0500
+++ types.h 2012-12-12 16:36:48.755034106 -0500
@@ -158,7 +158,7 @@
// used for memcpy and memset ISO C method
typedef unsigned int size_t;
-
+#define __size_t
#define FASTCALL
}}}
What version of the product are you using? On what operating system?
Ubuntu 12.10
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 12 Dec 2012 at 10:31
VDP_setBPlanAddress sets window_adr, must be a copy-paste bug.
/**
...
* A light gun returns the unsigned screen X coordinate. This is not calibrated;<br>
* Calibration is left to the game to handle. The value is -1 if the gun is not<br>
* pointed at the screen, or the screen is too dim to detect.<br>
...
*/
u16 JOY_readJoypadX(u16 joy);
&
u16 JOY_readJoypadY(u16 joy);
Wrong return value, should be s16
Original issue reported on code.google.com by [email protected]
on 12 Oct 2014 at 3:59
At least VDP_setPaletteColors should take a const pointer, maybe others too. Is there any reason it's not const yet?
Hi there.
I'm trying to insert a sprite that is 13x13 tiles big. Data seems to be OK, but as soon as an animation is changed, the sprite partially blinks and also displays some bad tiles.
Is there something important that I am missing or is it really a bug?
By the way, I made some slides about basic function usage etc and could send these to you.
PS: did not find your e-mail therefore I am sending this message.
Add flag to ignore use of these methods in int callback.
Original issue reported on code.google.com by Stephane.D
on 25 May 2012 at 9:59
It's probably a C lenguage problem, but i write it for if its not.
unsigned char lenght = 25;
unsigned char buffer[lenght];
Compies but show's illegal instruction on screen.
Original issue reported on code.google.com by [email protected]
on 3 Oct 2012 at 9:41
Just implement abs() function in math.h /math.c
Updates to make SGDK portable (not requires GDK env.variable).
Original issue reported on code.google.com by [email protected]
on 8 Jan 2014 at 8:24
Attachments:
The tutorial suggests this project works with Eclipse, Code::Blocks, & QtCreator. I also wondered if it would work with Visual Studio?
I usually use data types provided by stdint.h, such as uint16_t. But including this file on projects using also SGDK, causes type redefinition problems:
In file included from /opt/toolchains/gen//m68k-elf/include/genesis.h:7:0,
from main.c:8:
/opt/toolchains/gen//m68k-elf/include/types.h:142:21: error: conflicting types for 's8'
#define int8_t s8
^
/opt/toolchains/gen//m68k-elf/include/types.h:79:14: note: previous declaration of 's8' was here
typedef char s8;
^
Makefile:148: recipe for target 'main.o' failed
make: *** [main.o] Error 1
I think conflicting with standard header files should be avoided. Could this be fixed?
What steps will reproduce the problem?
1.VDP_drawImageEx() -> using Load Palette true
What is the expected output? What do you see instead?
If you load an image it flashes with the old palette during some milliseconds.
Instead of show the correct palette.
What version of the product are you using? On what operating system?
SGDK - Last Version
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 19 Aug 2014 at 11:46
Not really a issue but an featurerequest for the sake of completness.
the psg-part is missing a function for controlling the noisechannel.
something like the following should work (untested)
void PSG_setNoise(u8 type,u8 frequency)
{
vu8 *psg;
psg = (u8 *) PSG_PORT;
*psg = 0xE0 | ((type & 1) << 2) | (frequency & 0x3);
}
Original issue reported on code.google.com by [email protected]
on 30 Aug 2012 at 6:21
When i was compiling a PNG file (with an invalid palette between 2 tiles) as a SPRITE ResComp keep crashing, after a quick look up here's what i found:
Sprite.c in the Execute function :
sprDef = getSpriteDefinition(data, wt, ht, wf, hf, time, collid); (return null due to invalid palette in getTile)
removeEmptyFrame(sprDef);
if sprDef is null removeEmptyFrame access member of sprDef crashing ResComp.
What steps will reproduce the problem?
1. Checkout the repo (r96);
2. Try to compile with Eclipse CDT;
First error will be about "libmd.a", which can be fixed by copying it to ./lib
dir.
Second will be about:
"out/sega.o: In function `registersDump':
(.text+0x2a4): undefined reference to `registerState'".
How to fix that?
Original issue reported on code.google.com by [email protected]
on 8 Jan 2014 at 2:14
Labels name are generated multiple time:
see
https://gist.github.com/Ced2911/78f848ebb4bb1dba6a47#file-gfx-s-L1247
https://gist.github.com/Ced2911/78f848ebb4bb1dba6a47#file-gfx-s-L1259
using this .res file:
https://gist.github.com/Ced2911/78f848ebb4bb1dba6a47#file-gfx-res
Malloc.h is deprecated and replaced by stdlib.h. Leaving it in breaks building
on FreeBSD (and presumably OSX, though I can't test this ATM)
Patches are attached.
Original issue reported on code.google.com by [email protected]
on 13 Dec 2012 at 4:24
Attachments:
Maybe it will be better to move project on Github?
Github community could be a little bit active. :)
Original issue reported on code.google.com by [email protected]
on 23 Jan 2015 at 12:46
- Should provide a stop command (just by unloading the driver).
- Fix multiple play operation (clear Z80 ram before loading params and driver).
Original issue reported on code.google.com by Stephane.D
on 25 Jun 2013 at 1:40
Should return s16 instead u16
From
http://code.google.com/p/sgdk/source/diff?spec=svn171&r=171&format=side&path=/tr
unk/inc/string.h
42 u16 strcmp(const char *str1, const char *str2);
Also in string.c
Original issue reported on code.google.com by [email protected]
on 14 Mar 2014 at 1:21
In FadeInAll() after the function call, the original colors are left with a
darker color...
Original issue reported on code.google.com by [email protected]
on 9 Nov 2013 at 8:52
All set tilemap methods should consider window plan as well.
Because you sometimes only want to change HFLIP, VFLIP,.... should be interesting create an especific funcion for each task, in addition to SPR_setAttribut()
An example could be:
void SPR_setHFlip( Sprite *sprite, u8 HFlip )
{
if( HFlip )
{
sprite->attribut |= ( 1<<11 );
}
else
{
sprite->attribut &= ~( 1<<11 );
}
}
Others interesting functions:
SPR_setVFlip
SPR_setPalette
SPR_setPriority
The same with SPR_setPosition...
SPR_setPositionX
SPR_setPositionY
Should be created in order to update only one axis.
Change the TFM Z80 driver to avoid that constraint.
Original issue reported on code.google.com by Stephane.D
on 11 Oct 2013 at 1:03
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.