Because I sometimes do not need to write the upper byte
But I wrote a macro doing both write
(I'm never sure when a function is inlined, so I guess macros are faster)
Search found 316 matches
- Wed Apr 22, 2020 8:38 am
- Forum: SGDK
- Topic: Problem with DMA_doVramFill
- Replies: 5
- Views: 9218
- Tue Apr 21, 2020 11:02 pm
- Forum: SGDK
- Topic: Problem with DMA_doVramFill
- Replies: 5
- Views: 9218
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); because the 1st word write sends the lower byte to adress, the upper byte to adjacent adr...
- Tue Apr 21, 2020 1:33 pm
- Forum: SGDK
- Topic: Problem with DMA_doVramFill
- Replies: 5
- Views: 9218
Problem with DMA_doVramFill
I have a problem with DMA_doVRamFill. My plane A starts at VRAM adress 0xC000 with : 0xC000 : 2108 2108 2108 2108 2108 2108 2108 2108 2108 2108 (2108 means : tile 0x108 with palette 1, no priority, no flips) (If I'm not mistaken, VRAM is little-endian so it should be 08 21 inside). I want to change ...
- Thu Apr 16, 2020 7:33 pm
- Forum: SGDK
- Topic: HScroll Tile mode
- Replies: 11
- Views: 18407
Re: HScroll Tile mode
(image attachment doesn't seem to work : it's the second boss of Shinobi arcade )
- Wed Apr 15, 2020 11:56 am
- Forum: SGDK
- Topic: HScroll Tile mode
- Replies: 11
- Views: 18407
Re: HScroll Tile mode
Thank you, it seems to work like a charm
Get ready Black Turtle !
Get ready Black Turtle !
- Tue Apr 14, 2020 3:59 pm
- Forum: SGDK
- Topic: HScroll Tile mode
- Replies: 11
- Views: 18407
Re: HScroll Tile mode
Thanks
But don't I need to disable HInt at the end of my_callback() ?
If I don't do it, won't HInt be triggered at every line after scanline ?
But don't I need to disable HInt at the end of my_callback() ?
If I don't do it, won't HInt be triggered at every line after scanline ?
- Tue Apr 14, 2020 11:03 am
- Forum: SGDK
- Topic: HScroll Tile mode
- Replies: 11
- Views: 18407
Re: HScroll Tile mode
Thanks, you confirm what I thought :) So, is this the way to do it : 1) just after VBlank, I set register 10 with the (scanline - 1) and enable HInt (with a custom callback function) : VDP_setReg(10, scanline - 1); SYS_setHIntCallback(my_callback) SYS_setInterruptMaskLevel(4); 2) the callback functi...
- Tue Apr 14, 2020 8:59 am
- Forum: SGDK
- Topic: HScroll Tile mode
- Replies: 11
- Views: 18407
Re: HScroll Tile mode
I also was wondering something : I want to simulate parallax scrolling in one plane : lines above line 448 of the map must scroll at half-speed, lines below at full speed. There can be vertical scroll, so line 448 of the map is not always at the same screen height (let's call scanline the correspond...
- Mon Apr 13, 2020 6:03 pm
- Forum: SGDK
- Topic: HScroll Tile mode
- Replies: 11
- Views: 18407
HScroll Tile mode
Hello, I want to use Horizontal scrolling per tile mode, and I see I shuld use : VDP_setHorizontalScrollTile(VDPPlane plane, u16 tile, s16* values, u16 len, TransferMethod tm); I read that TransferMethod tm can be : * Transfer method.<br> * Accepted values are:<br> * - CPU<br> * - DMA<br> * - DMA_QU...
- Wed Dec 25, 2019 10:01 am
- Forum: Megadrive/Genesis
- Topic: Shinobi arcade port
- Replies: 3
- Views: 9573
Shinobi arcade port
I think I never talked about my project here, which is a shame since this forum got me the most valuable advices about Megadrive programming. I've started some years ago a port of the 1987 Shinobi arcade game on Megadrive. Back in the days I was in love with this game, and I thought it was really sa...
- Fri Oct 25, 2019 1:53 pm
- Forum: SGDK
- Topic: [XGM] PCM sfx doesn't start
- Replies: 3
- Views: 8986
Re: [XGM] PCM sfx doesn't start
Yes we did, and you're right, that's indeed the problem. At first I thought I had a priority problem, then that isPlayingPCM was releasing info too early, but it's the contrary : it takes too much time to consider the channel used. I'll update my "pcm manager" to block a channel during the 2 first f...
- Thu Oct 24, 2019 8:06 pm
- Forum: SGDK
- Topic: [XGM] PCM sfx doesn't start
- Replies: 3
- Views: 8986
Re: [XGM] PCM sfx doesn't start
After some texts, I think the problem is related to XGM_isPCMPlaying...
- Thu Oct 24, 2019 5:32 pm
- Forum: SGDK
- Topic: [XGM] PCM sfx doesn't start
- Replies: 3
- Views: 8986
[XGM] PCM sfx doesn't start
I noticed sometimes, PCM sfx doesn't start when I call XGM_playPCM. Especially when I play very close sfx. Therefore I have the 3 questions : 1) is the priority the only thing that can prevent a PCM to be played ? 2) does a priority of 15 mean that the PCM will overpass any playing PCM (so it can't ...
- Wed Aug 28, 2019 1:28 pm
- Forum: Megadrive/Genesis
- Topic: Sega Tech Docs archive
- Replies: 26
- Views: 402598
Re: Sega Tech Docs archive
Huge move. Thank you all for gathering this...
- Wed Jul 24, 2019 3:30 pm
- Forum: SGDK
- Topic: SGDK1.4 crashes at compilation
- Replies: 4
- Views: 7883
Re: SGDK1.4 crashes at compilation
Mmmh, I'll try to compile in my fridge and keep you informed