Search found 3131 matches
- Wed Apr 22, 2020 9:00 am
- Forum: SGDK
- Topic: Problem with DMA_doVramFill
- Replies: 5
- Views: 9336
Re: Problem with DMA_doVramFill
If you use not too old SGDK with recent GCC (6.3) you can be confident about inlining. The LTO optimization does wonder, it even sometime push it a bit too much (making code size a bit large) but so you can safely use fonction for almost everything (as you can see i don't care too much with them in ...
- Wed Apr 22, 2020 7:41 am
- Forum: SGDK
- Topic: Problem with DMA_doVramFill
- Replies: 5
- Views: 9336
Re: Problem with DMA_doVramFill
OK, I think I understood the problem. I looked in source code of DMA_doVRamFill. In fact, the "value" parameter needs to be u8. Then, when sending the value to data port, you write : *pw = value | (value << 8); ... So I modified the DMA_doVRamFill function by making value a u16, and sending value t...
- Tue Apr 21, 2020 7:47 pm
- Forum: SGDK
- Topic: Sega Genesis Dev Kit (SGDK)
- Replies: 852
- Views: 1241362
Re: Sega Genesis Dev Kit (SGDK)
Thanks a lot Chilly Willy, looks like this unit needed a documentation update :p
I will add all those precious informations in the header as this is very informative
I will add all those precious informations in the header as this is very informative
- Tue Apr 21, 2020 7:39 pm
- Forum: SGDK
- Topic: Problem with DMA_doVramFill
- Replies: 5
- Views: 9336
Re: Problem with DMA_doVramFill
In fact SGDK just take care about adjusting len but not the way data are written (and it should probably indeed) so currently you have to take care of that yourself. And unfortunately it's not really straightforward to handle that..
- Tue Apr 21, 2020 8:34 am
- Forum: SGDK
- Topic: Sega Genesis Dev Kit (SGDK)
- Replies: 852
- Views: 1241362
Re: Sega Genesis Dev Kit (SGDK)
You're welcome ! I forgot to mention it indeed, i just updated to SGDK 1.50, i think i will soon publish a 1.51 version to fix minors issues (as usual) :p
- Sun Apr 19, 2020 6:49 pm
- Forum: SGDK
- Topic: Fast question about HUD and strings
- Replies: 7
- Views: 6953
Re: Fast question about HUD and strings
Yeah i modified code so you can just use intToStr(..) now and it should be fast
- Fri Apr 17, 2020 7:38 am
- Forum: SGDK
- Topic: HScroll Tile mode
- Replies: 11
- Views: 18766
Re: HScroll Tile mode
Oh i never realized that was the name of second boss :p
- Thu Apr 16, 2020 12:49 pm
- Forum: SGDK
- Topic: Fast question about HUD and strings
- Replies: 7
- Views: 6953
Re: Fast question about HUD and strings
VDP_drawText(..) is the easiest way definitely (using the window plan to not sacrifice a whole background for that)..
You can use sprites to do it but SGDK doesn't provide any help for that unfortunately.
You can use sprites to do it but SGDK doesn't provide any help for that unfortunately.
- Thu Apr 16, 2020 10:02 am
- Forum: SGDK
- Topic: HScroll Tile mode
- Replies: 11
- Views: 18766
Re: HScroll Tile mode
Well done !
Black Turtle ? :p
Black Turtle ? :p
- Thu Apr 16, 2020 10:01 am
- Forum: SGDK
- Topic: Fast question about HUD and strings
- Replies: 7
- Views: 6953
Re: Fast question about HUD and strings
Don't use sprintf for something you need to update often. sprintf is *terribly* slow. If you really need to convert int to String then use intToStr(..) method. It's a bit less convenient than sprintf(..) but much faster (still consuming CPU time). About overlapping, you can put plane A (containing t...
- Tue Apr 14, 2020 4:35 pm
- Forum: SGDK
- Topic: HScroll Tile mode
- Replies: 11
- Views: 18766
Re: HScroll Tile mode
Oh yeah you're right, it will be called at each "scanline - 1" so if "scanline -1" is lower than 112 (2x112=224 lines) then indeed you will have multiple calls for a single screen. I think the easiest solution is indeed to call VDP_setHInterrupt(FALSE) after the scrolling change. Then don't forget t...
- Tue Apr 14, 2020 3:48 pm
- Forum: SGDK
- Topic: HScroll Tile mode
- Replies: 11
- Views: 18766
Re: HScroll Tile mode
Well, that was almost that :P SYS_setHIntCallback(my_callback); VDP_setHInterrupt(TRUE); VDP_setHIntCounter(scanline - 1); No need to deal with the SYS_setInterruptMaskLevel(...) stuff, it should be fine by default. Then in your callback : void my_callback() { VDP_setHorizontalScroll(new_value); } U...
- Tue Apr 14, 2020 9:12 am
- Forum: SGDK
- Topic: HScroll Tile mode
- Replies: 11
- Views: 18766
Re: HScroll Tile mode
Wouldn't it be faster keep plane hscroll mode, to activate HInt at (scanline - 1), then change the HScroll register in HInt ? Using line scroll just for a single parallax is really a waste of performance (as you need to update scroll value for each line). Of course it's *much* better to use Hint he...
- Tue Apr 14, 2020 9:10 am
- Forum: SGDK
- Topic: HScroll Tile mode
- Replies: 11
- Views: 18766
Re: HScroll Tile mode
Looks like you're using last repository version, be careful it's still a bit experimental but it should work :p I tried to document the DMA_QUEUE_COPY from the doxygen but i admit it remains obscure: Copy the buffer and put in the DMA queue so it will be transferred at next VBlank The difference bet...
- Sat Apr 11, 2020 4:45 pm
- Forum: SGDK
- Topic: Sega Genesis Dev Kit (SGDK)
- Replies: 852
- Views: 1241362
Re: Sega Genesis Dev Kit (SGDK)
Maybe you can edit the title but honestly *many* people fall in that kind of trouble / caveat so it can still be somehow useful