Search found 2511 matches

by Stef
Thu Mar 16, 2017 10:41 am
Forum: SGDK
Topic: pixels are not displayed
Replies: 14
Views: 599

Re: pixels are not displayed

Just use a map cache in RAM like this : Map* map = allocateMapEx(40, 28); u16 *tilemap = map->tilemap; ... u16 offi = 0; u16 offj = 0; u16 time = 1000; // main loop while(time--) { // generate plasma map for(u16 i = 0; i < 40; i++) { for(u16 j = 0; j < 28; j++) { u16 pixstate = ((sinFix16(offi + (i ...
by Stef
Fri Feb 24, 2017 10:22 am
Forum: Super 32X
Topic: Faster Sprites routines on the 32X?
Replies: 9
Views: 322

Re: Faster Sprites routines on the 32X?

Yeah i though about the problem just after having posted the code. The problem is that sprite can be display at any X offset so possible odd address. With 32 bit pointer you force address to be align on 4 bytes, which result in the X movement 4 pixels wide movement. So you definitely need to pass by...
by Stef
Thu Feb 23, 2017 4:26 pm
Forum: Megadrive/Genesis
Topic: Langrisser II (v1.2) opening tile graphics bug
Replies: 5
Views: 245

Re: Langrisser II (v1.2) opening tile graphics bug

Yeah the VRAM copy (and in fact all VRAM writes internally) is byte wide, i had it wrong as well when i first implemented it in Gens. If i remember correctly you can also observe the bug in James Pond 3 - Operation Starfish game (some platforms requires correct VRAM Copy DMA for correct display, no ...
by Stef
Thu Feb 23, 2017 12:12 pm
Forum: Megadrive/Genesis
Topic: Langrisser II (v1.2) opening tile graphics bug
Replies: 5
Views: 245

Re: Langrisser II (v1.2) opening tile graphics bug

From my memory (it was 15 years ago so i may be wrong) i think this bug is due to an incorrect VRAM to VRAM DMA copy implementation.
by Stef
Thu Feb 23, 2017 12:02 pm
Forum: Super 32X
Topic: Faster Sprites routines on the 32X?
Replies: 9
Views: 322

Re: Faster Sprites routines on the 32X?

I could be wrong but i think you forgot to add fbOff++; in the while(x--) loop. Oh yeah stupid typo, in fact seeing you code you can improve it a bit further : inline void drawSprite(u32* spriteBuffer, u16 x, u16 y, u16 xWidth, u16 yWidth) { vu32 *frameBuffer = (vu32*) &MARS_OVERWRITE_IMG; // d...
by Stef
Wed Feb 22, 2017 10:25 pm
Forum: Super 32X
Topic: Faster Sprites routines on the 32X?
Replies: 9
Views: 322

Re: Faster Sprites routines on the 32X?

If inlining does not work try at least to replace your fast_memcpy(..) call by the inlined fast_memcpy(..) code. I don't understand if you are copying 8 bytes or 16 bytes per memcpy(..) call, it looks like each pixel is 16 bits so 16 bytes ? In which case you should try to replace : for (rowPos = 0;...
by Stef
Tue Feb 21, 2017 1:15 pm
Forum: Super 32X
Topic: Faster Sprites routines on the 32X?
Replies: 9
Views: 322

Re: Faster Sprites routines on the 32X?

Using word_8byte_copy(..) method each time you want to copy 8 pixels of sprite data is definitely heavy if your compiler does not inline this method (and if you use GCC i'm not sure it does it). Also C method is definitely much less efficient for a low level stuff like that, with pure SH2 assembly c...
by Stef
Mon Feb 20, 2017 8:52 pm
Forum: Megadrive/Genesis
Topic: Write Genesis program to test YM2612
Replies: 5
Views: 177

Re: Write Genesis program to test YM2612

Your methods look correct but if you use SGDK, why are you rewriting all these methods which already exists ?
Z80_requestBus(..)
Z80_releaseBus()
YM_writeRegSafe(..)
YM2612_writeRegSafe(..)

I think there is everything you need to do some basic YM tests.
by Stef
Sat Feb 11, 2017 10:50 am
Forum: Megadrive/Genesis
Topic: Please help decide on projection
Replies: 12
Views: 277

Re: Please help decide on projection

In fact the left vision has many advantages and only one disadvantage (worse appearance). You can consider left view as a "top" view mostly, so you just end with a simple 2D logic game (where X,Y can be see as X,Z but that doesn't make any difference). The right view on another hand is a 3...
by Stef
Fri Jan 20, 2017 9:38 am
Forum: SGDK
Topic: Map loading & scrolling: is my theory right?
Replies: 5
Views: 281

Re: Map loading & scrolling: is my theory right?

Yeah this is definitely not a must have feature because as you said, a lot of people will prefer to develop their own engine adapted and optimized for their needs. Still a generic engine could help for beginner :)
by Stef
Fri Jan 20, 2017 9:37 am
Forum: SGDK
Topic: [SOLVED] 4PCM_ENV popping sounds?
Replies: 4
Views: 197

Re: [SOLVED] 4PCM_ENV popping sounds?

Glad you fixed it :)
About the noise issue in conversion, it all depends from rounding law used. I know rescomp doesn't really take care of that. Also the resampling code in rescomp is dumb, making sound quality really bad. All audio processing definitely need to be done before if possible ;)
by Stef
Thu Jan 19, 2017 3:54 pm
Forum: SGDK
Topic: Map loading & scrolling: is my theory right?
Replies: 5
Views: 281

Re: Map loading & scrolling: is my theory right?

That sound good to me as well :)
At some point i plan to add some basic "scrollable level" features in SGDK but that will take time :p
by Stef
Thu Jan 19, 2017 3:49 pm
Forum: SGDK
Topic: [SOLVED] 4PCM_ENV popping sounds?
Replies: 4
Views: 197

Re: 4PCM_ENV popping sounds?

I guess you are using raw PCM data so you don't convert your sample with rescomp, you just put the raw data inside your rawSoundData[] array and you align them on 256 bytes. The problem is about the alignment, in rescomp i do take care of doing a linear fade from the last sample value to 0 in the al...
by Stef
Sat Jan 14, 2017 10:46 am
Forum: SGDK
Topic: Problems with Highlight Shadow Mode
Replies: 7
Views: 233

Re: Problems with Highlight Shadow Mode

Your demo is indeed a good use of the shadow effect ;) And you're right, it was supposed to be used like this i guess, kind of shadow/hilight operator on background ;) The thing that make it complicated to use is that it also works with priority... because of that many games cannot use it. Having on...
by Stef
Thu Jan 12, 2017 12:32 am
Forum: SGDK
Topic: Scrolling Map Demo
Replies: 14
Views: 607

Re: Scrolling Map Demo

Hik wrote:I took the sega.s out of the scrolling-map-demo/src/boot folder and then it worked to compile

Looks and works good now thanks for sharing, kcowolf


Looks like your sega.s file was corrupted then ;)

Go to advanced search