MD Mega Fighter (aka mmf)
Moderator: Mask of Destiny
MD Mega Fighter (aka mmf)
Hello all,
I've started a quite ambitious project, a fighting game.
I don't know if I'm gonna finish it one day but it's a pretty complete project to learn a lot of thing on the MD
You can download the demo here.
For now you can only move/jump and only with player1, the player2 is here just for fun.
There is a glitch while you jump forward or backward (only in fusion), I'm trying to find a solution to fix that ....
I've not tried on HW so if anybody can for me
The source will follow soon.
I've started a quite ambitious project, a fighting game.
I don't know if I'm gonna finish it one day but it's a pretty complete project to learn a lot of thing on the MD
You can download the demo here.
For now you can only move/jump and only with player1, the player2 is here just for fun.
There is a glitch while you jump forward or backward (only in fusion), I'm trying to find a solution to fix that ....
I've not tried on HW so if anybody can for me
The source will follow soon.
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Do you use DMA for the sprites ? I'm sure you do, and you are crossing a 128K boundary here (DMA updates only 16bits of the source address), so this glitch will happen on real HW aswell (not tried). Only Fusion does emulates this feature.
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Gave a whirl on real HW and surprise surprise, it does not run. Luckily for you I had EXACT same problem in my game, and the problem is having DMA enabled and writing $00 to the last DMA reg !!! You either write $80 or don't set the DMA enable bit. This is the DMA bug I believe, one workaround is making Z80 run code that accesses ROM, this way you won't get crashes.
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
Can you give more info on this Z80 workaround you mentioned? Are you saying that simply reading ROM data from the Z80 will somehow prevent this lockup from occurring, or release the system from a locked state?TmEE co.(TM) wrote:Gave a whirl on real HW and surprise surprise, it does not run. Luckily for you I had EXACT same problem in my game, and the problem is having DMA enabled and writing $00 to the last DMA reg !!! You either write $80 or don't set the DMA enable bit. This is the DMA bug I believe, one workaround is making Z80 run code that accesses ROM, this way you won't get crashes.
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
When I had this issue in my game, I tried everything possible until I noticed I do an accidental DMA during reg initialization. The crash never happened when my sound engine played music with drums (aka heavy ROM access), Z80 initialized before VDP setup... when the DMA crash happens, the whole system seems stopped, though I'm not 100% sure as my engine may be waiting a command from 68K which is halted.
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
I didn't really understand the dma bug ...
Here is what I do (in vblank):
- Enable DMA
- Setup DMA to copy tiles
- Disable DMA
Two times (each times for each player cause I didn't update the tile if the frame is the same).
I know I should wait for DMA BUSY = 0 to disable the dma, this may cause a bug ....
Here is what I do (in vblank):
- Enable DMA
- Setup DMA to copy tiles
- Disable DMA
Two times (each times for each player cause I didn't update the tile if the frame is the same).
I know I should wait for DMA BUSY = 0 to disable the dma, this may cause a bug ....
-
- Very interested
- Posts: 745
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
You're having accidental DMA right in the reg initialization, when I run in on my MD2 I get a switch to 240 line res and a crash, with VRAM and palettes being in the undefined state (with TMSS enabled, I get the TMSS screen in 240line res)... that is, the code does not even reach the RAM clearing... I had same problem in my game, and cause was accidental DMA and a crash caused by it... 68K should be halted and nothing should happen, but it still crashes, and only DMA crashes are related to the DMA crashing bug mentioned in the manual. I've never ran into the bug as I've nearly always had Z80 doing something with the ROM... I'm quite sure that without any ROM access on Z80 side, I will probably start getting crashes in some situations unless I do the workaround Sega mentioned.
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
It still doesn't work... crash during reg init... don't load last VDP register, maybe it helps... I know all my ROMs work because of a bug in my code that left last VDP register to be untouched
BTW, 240 line res is 50Hz only, you get rolling screen in 60Hz.
BTW, 240 line res is 50Hz only, you get rolling screen in 60Hz.
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen