Search found 3120 matches

by Stef
Tue Oct 11, 2022 7:12 am
Forum: SGDK
Topic: How to duplicate sprites using VRAM tiles once?
Replies: 5
Views: 899

Re: How to duplicate sprites using VRAM tiles once?

SPR_loadAllFrames(..) This couldn´t be used due to severe memory restrictions; There is a 1000 tiles framebuffer in VRAM (some screens have more than 900 different tiles at once), and around 700 free tiles for 20+ sprites... If I execute this sentence: SPR_setVRAMTileIndex(entidad[aux].spr) without...
by Stef
Mon Oct 10, 2022 9:16 am
Forum: SGDK
Topic: How to duplicate sprites using VRAM tiles once?
Replies: 5
Views: 899

Re: How to duplicate sprites using VRAM tiles once?

You can do that by using SPR_setVRAMTileIndex(..) so you define where the sprite tiles are located in VRAM. You have this function SPR_loadAllFrames(..) function which load all frames of a SpriteDefinition so you can easily share the tile indexes along several sprites then. The sonic sample show an ...
by Stef
Fri Aug 26, 2022 8:11 am
Forum: Announcement
Topic: Hello you all
Replies: 8
Views: 3107

Re: Hello you all

Welcome on the board ! As you noticed indeed forums are not as active than they were some years ago, new tools as Discord appeared and lot of people moved there. I've to admit myself that i rather prefer to use Discord (there is a SGDK discord server), it's just faster to discuss / provide support u...
by Stef
Mon Aug 22, 2022 8:24 am
Forum: Demos
Topic: [Sega MD] various test roms for emu's
Replies: 3
Views: 759

Re: [Sega MD] various test roms for emu's

Thanks ! These are very useful test ROMs !
First time i saw BlastEm failing on that much tests.
I don't even speak about Gens who fail everywhere :lol:
by Stef
Tue Jul 19, 2022 10:00 am
Forum: SGDK
Topic: polygon is not drawn
Replies: 19
Views: 2202

Re: polygon is not drawn

alko wrote:
Fri Jul 15, 2022 6:57 pm
:oops:

Code: Select all

 line = MEM_alloc( sizeof(Line));
No, it's really overkill and you may not release it properly later.
Just use static structure for that:

Code: Select all

 Line line;
line.pt1.x =0;
line.pt1.y =0;
line.pt2.x =100;
line.pt2.y =100;
line.col=10;

BMP_drawLine(&line);
by Stef
Tue Jul 19, 2022 9:58 am
Forum: SGDK
Topic: Form day to night, impossible to compile. gcc.exe: fatal error: -fuse-linker-plugin, but libto_plugin-0.dll not found
Replies: 2
Views: 1003

Re: Form day to night, impossible to compile. gcc.exe: fatal error: -fuse-linker-plugin, but libto_plugin-0.dll not foun

Do a complete clean of your project, you may have dirty .s files somewhere..
I also experienced it and fixed it just by cleaning some intermediate .s file not properly cleaned
by Stef
Tue Jul 19, 2022 9:55 am
Forum: Demos
Topic: Instruction timing test (68000)
Replies: 7
Views: 1279

Re: Instruction timing test (68000), wip.

Very interesting but i'm not sure to understand the VRAM/VSRAM cycles number. 85 cycles is for VRAM read operation during display ON i guess and continuous operation ? what represent the first 19 cycles ? single VRAM read operation ? I'm also very surprised by the 11 cycles obtained on long VRAM wri...
by Stef
Wed Jul 13, 2022 7:31 am
Forum: SGDK
Topic: polygon is not drawn
Replies: 19
Views: 2202

Re: polygon is not drawn

Kega isn't accurate, nor Gens is. You should test with BlastEm to see if you still have the same problem.
About the font, you can just "overwrite" it with your own tiles if you don't use it :)
by Stef
Mon Jul 11, 2022 7:55 am
Forum: SGDK
Topic: polygon is not drawn
Replies: 19
Views: 2202

Re: polygon is not drawn

The BMP mode uses a lot of main ram but also lot of VRAM so first you need to be sure you have enough VRAM to actually store your image. Bitmap start to allocate its rendering buffer to TILE_USER_INDEX so you will overwrite it when you draw your image. You need to initialize ind with BMP_FB1_END_TIL...
by Stef
Wed Jul 06, 2022 8:39 am
Forum: SGDK
Topic: polygon is not drawn
Replies: 19
Views: 2202

Re: polygon is not drawn

Resolution is fixed, that is a limitation of the bitmap engine, mean that you're limited to 20 FPS max on NTSC systems and 30 FPS on PAL systems. Resolution was flexible in priors implementations (very old SGDK version) but code was more convoluted and not as fast (width as power of 2 is a big win h...
by Stef
Mon Jul 04, 2022 8:26 am
Forum: SGDK
Topic: polygon is not drawn
Replies: 19
Views: 2202

Re: polygon is not drawn

Unfortunately no. First because it makes the polygon processing easier (no need to test about clockwise direction) and also because that is the way to do back culling when drawing 3D transformed objects in general.
So yeah, when defining 2D polygons, you need to take care of that.
by Stef
Mon Jul 04, 2022 8:22 am
Forum: SGDK
Topic: Sega Genesis Dev Kit (SGDK)
Replies: 852
Views: 748416

Re: Sega Genesis Dev Kit (SGDK)

Yeah i renamed that recently to have better consistency in definition names, i probably forgot to update them in some places though. Thanks for reporting, I will check that !
by Stef
Sun Jun 26, 2022 7:51 pm
Forum: SGDK
Topic: polygon is not drawn
Replies: 19
Views: 2202

Re: polygon is not drawn

You don't initialize pts correctly. By default variable are not initialized in C so you can't do MEM_free(pts); without having initialized pts first. Normally you should have done: pts = NULL; Then you should try to release pts only if pts != NULL so there is no reason to try to release on init. Ano...
by Stef
Thu May 19, 2022 7:37 pm
Forum: Demos
Topic: WIP Satan Claus - Mega Drive / Genesis / 32x
Replies: 7
Views: 1397

Re: WIP Satan Claus - Mega Drive / Genesis / 32x

Looks like a nice platform / puzzle game :) do you make everything yourself ??
by Stef
Tue Apr 19, 2022 9:06 am
Forum: SGDK
Topic: Dynamically modify a Map
Replies: 7
Views: 1859

Re: Dynamically modify a Map

To be honest i'm checking this forum less and less as most of the support is given through my discord server where lot of people can reply : https://discord.gg/CeJtKmyT The sonic example won't help much here as it's still based on a Map resource even with setTileMapEx(..) The easiest way to deal wit...