Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
Moderators: Mug UK, lp, moondog/.tSCc., [ProToS], Moderator Team
Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
At first I would like to say that I am not sure if the Atari STE will be able to have the power for a good port. Considering that the CPS1 system is clocked at 10 MHz (even worse: the ported game source code runs on a 12 MHz machine). Anyway, at least the Falcon will be definitely a good target but needs some gameplay code changes to get it running. Unfortunately they're playing with the stack frame data on certain places and this is clearly a no-go on the MC68030.
The game code has been ported using a special version of MAME in combination with a special disassembler which produce a source code which can be reassembled with vasm and reused by MAME. This was important to check if the code can be changed by adding/removing code parts. This method works for any MC68000 based games so theoretically almost anything running on that CPU can be ported "easily".
The Daimakaimura game code runs in the same address range like on the arcade machine so that (undetected, non-relocated) addresses hidden in the data area didn't break the game logic.
JagPad/PowerPad support is implemented so you can start and play the game. In fact, the gameplay is complete and "only" the sound and graphics are missing.
So let's have a look how far I can get.
At first I would like to say that I am not sure if the Atari STE will be able to have the power for a good port. Considering that the CPS1 system is clocked at 10 MHz (even worse: the ported game source code runs on a 12 MHz machine). Anyway, at least the Falcon will be definitely a good target but needs some gameplay code changes to get it running. Unfortunately they're playing with the stack frame data on certain places and this is clearly a no-go on the MC68030.
The game code has been ported using a special version of MAME in combination with a special disassembler which produce a source code which can be reassembled with vasm and reused by MAME. This was important to check if the code can be changed by adding/removing code parts. This method works for any MC68000 based games so theoretically almost anything running on that CPU can be ported "easily".
The Daimakaimura game code runs in the same address range like on the arcade machine so that (undetected, non-relocated) addresses hidden in the data area didn't break the game logic.
JagPad/PowerPad support is implemented so you can start and play the game. In fact, the gameplay is complete and "only" the sound and graphics are missing.
So let's have a look how far I can get.
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
Chuck Norris of code.
Ain't no space like PeP-space.
-
- Atari Super Hero
- Posts: 926
- Joined: Thu Sep 11, 2003 10:49 pm
- Location: UK
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
Superb Anima.
-
- Atari Super Hero
- Posts: 926
- Joined: Thu Sep 11, 2003 10:49 pm
- Location: UK
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
Was this the reason why you gave up on the Final Fight (also a CPS1 game) Falcon port Anima? This rings a bell...Anima wrote:Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
At first I would like to say that I am not sure if the Atari STE will be able to have the power for a good port. Considering that the CPS1 system is clocked at 10 MHz (even worse: the ported game source code runs on a 12 MHz machine). Anyway, at least the Falcon will be definitely a good target but needs some gameplay code changes to get it running. Unfortunately they're playing with the stack frame data on certain places and this is clearly a no-go on the MC68030.
Just realised how many amazing games are running on CPS1 actually. Not all of them are candidates for ports obviously.
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
Great News Anima! you are the master!
I know that its very soon for requests, but I'd like make a question about the sound & music. Also will be implemented? YM2151 emulator? without sound but with audio effects? If you decided launch it for Falcon, can be used the DSP for load the original music (like a sample) meanwhile we play?
thanks for your epic work!
I know that its very soon for requests, but I'd like make a question about the sound & music. Also will be implemented? YM2151 emulator? without sound but with audio effects? If you decided launch it for Falcon, can be used the DSP for load the original music (like a sample) meanwhile we play?
thanks for your epic work!
・Falcon ct60e・Atari MegaSTE ・Atari STe ・
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
Great ☺, thanks Amina !
-
- Atari God
- Posts: 1245
- Joined: Wed Feb 11, 2004 4:34 pm
- Location: Middle Earth (Npton) UK
- Contact:
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
Whoo!
"Where teh feck is teh Hash key on this Mac?!"
- AtariCrypt
- Captain Atari
- Posts: 490
- Joined: Fri Mar 14, 2014 5:04 pm
- Location: Lancashire, England
- Contact:
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
Oh boy!!!
AtariCrypt - Atari ST gaming website
https://ataricrypt.blogspot.com
https://ataricrypt.blogspot.com
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
Thanks!
Yes, but also having a decompression/decryption routine at start was a problem for a straight forward disassembling of Final Fight on the X68000. That's, in fact, a good thing with a program stored in ROM: you don't have to fear self modifying code.EvilFranky wrote:Was this the reason why you gave up on the Final Fight (also a CPS1 game) Falcon port Anima? This rings a bell...
It depends what is possible on the specific system. For the Falcon I have same ideas based on an optimised version of the Cho Ren Sha 68k DSP sprite engine so that I could also think of adding sound emulation. But this is something for the future.Estrayk wrote:I know that its very soon for requests, but I'd like make a question about the sound & music. Also will be implemented? YM2151 emulator? without sound but with audio effects? If you decided launch it for Falcon, can be used the DSP for load the original music (like a sample) meanwhile we play?
-
- Atari Super Hero
- Posts: 926
- Joined: Thu Sep 11, 2003 10:49 pm
- Location: UK
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
Thanks for the explanation AnimaAnima wrote:Yes, but also having a decompression/decryption routine at start was a problem for a straight forward disassembling of Final Fight on the X68000. That's, in fact, a good thing with a program stored in ROM: you don't have to fear self modifying code.EvilFranky wrote:Was this the reason why you gave up on the Final Fight (also a CPS1 game) Falcon port Anima? This rings a bell...
So actually the Final Fight CPS arcade board would be a better target for a conversion rather than the X68000 version, with some effort anyway. Interesting.
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
Yes that's correct. Well, a CPS1 "MMU emulator" for the Falcon is actually a tempting idea on the first look. At least it's a way less technically "demanding" system than the Neo Geo. Unfortunately a special MC68030 MMU approach will not work on accelerated systems.EvilFranky wrote:So actually the Final Fight CPS arcade board would be a better target for a conversion rather than the X68000 version, with some effort anyway. Interesting.
- dlfrsilver
- Fuji Shaped Bastard
- Posts: 2305
- Joined: Mon Jan 31, 2005 1:41 am
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
Very interesting.... ok, so i guess that Strider X68000 for which i put my hands in also use the same decompression/decryption system......
Anima, do you plan to make the game code ressourced available ? Anyway that's a great idea
How much ram do the game will need on STE ? 4mb of ram ?
Anima, do you plan to make the game code ressourced available ? Anyway that's a great idea
How much ram do the game will need on STE ? 4mb of ram ?
Now SPS France representative since the 19th of June 2014. Proud to be an SPS member !
Atari 520 STF / Atari 1040 STF / Atari 520 STE / Atari 1040 STE / Atari Falcon 030 14mb + 8gb CF
Atari 520 STF / Atari 1040 STF / Atari 520 STE / Atari 1040 STE / Atari Falcon 030 14mb + 8gb CF
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
I think there are two issues making the source code public. First it's still not completely relocatable and (even more important) there are legal questions about the copyright. Besides that, I'd like to share it, why not.dlfrsilver wrote:Anima, do you plan to make the game code ressourced available ? Anyway that's a great idea
How much ram do the game will need on STE ? 4mb of ram ?
Regarding the memory requirement it'll need 4 MB RAM on the Atari STE for sure. The game code itself is 1 MB in size so there's not much space left for a scrolling double+background buffering. Also the sprites will take another huge chunk of RAM as well.
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
This is awesome and has a lot of potential. Though if it basically uses MAME code (if I'm misunderstanding this, please tell me), does that mean it would need the rom from the arcade to play? in which case the actual source code for the modified MAME should be freely distributable, right?
(Oh, maybe re-reading that, it sounds like MAME was used to disassemble the original ROM and then its source was modified, which is absolutely brilliant, though I also would think that any patches to the source could be distributed, just not the actual source, which would need to be disassembled by anyone who wants to work on this modification, right? Yeah, you're right, that gets into weird legal areas).
(Oh, maybe re-reading that, it sounds like MAME was used to disassemble the original ROM and then its source was modified, which is absolutely brilliant, though I also would think that any patches to the source could be distributed, just not the actual source, which would need to be disassembled by anyone who wants to work on this modification, right? Yeah, you're right, that gets into weird legal areas).
Atari 8Bits: 800xl, 600xl, XEGS, 800, 130xe, 130xe (VBXE, U1MB, Stereo POKEY)
Atari STs: 1040STf (broken shifter), 1040STe, Mega STe, TT030, Falcon (CT60e, SuperVidel)
Atari STs: 1040STf (broken shifter), 1040STe, Mega STe, TT030, Falcon (CT60e, SuperVidel)
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
The MAME source has been modified so that it will save telemetry data when the game is running. This telemetry data and the program ROM are being processed by a special disassembler which produces a real source code of the program.leech wrote:(Oh, maybe re-reading that, it sounds like MAME was used to disassemble the original ROM and then its source was modified, which is absolutely brilliant, though I also would think that any patches to the source could be distributed, just not the actual source, which would need to be disassembled by anyone who wants to work on this modification, right? Yeah, you're right, that gets into weird legal areas).
Here's an actual snippet:
Code: Select all
L_00016dca:
cmpi.b #$2,$50dc(a5) ; [00000001] 00016dca: 0c2d 0002 50dc
beq.b L_00016df4 ; [00000001] 00016dd0: 6722
move.w d0,d5 ; [00000001] 00016dd2: 3a00
jsr L_00002184.w ; [00000001] 00016dd4: 4eb8 2184
beq.b L_00016df4 ; [00000001] 00016dd8: 671a
addq.b #$1,-$766c(a5) ; [00000001] 00016dda: 522d 8994
addq.b #$1,$50dc(a5) ; [00000001] 00016dde: 522d 50dc
jsr L_000026dc.w ; [00000001] 00016de2: 4eb8 26dc
bsr.w L_00016e32 ; [00000001] 00016de6: 6100 004a
add.w d5,d5 ; [00000001] 00016dea: da45
move.w L_00016df6(pc,d5.w),d5 ; [00000001] 00016dec: 3a3b 5008
jmp L_00016df6(pc,d5.w) ; [00000001] 00016df0: 4efb 5004
L_00016df4:
rts ; [00000001] 00016df4: 4e75
L_00016df6:
dc.w L_00016e74-L_00016df6
dc.w L_00016ed4-L_00016df6
dc.w L_00016f9c-L_00016df6
dc.w L_00016f14-L_00016df6
L_00016dfe:
cmpi.b #$2,$50dc(a5) ; [00000001] 00016dfe: 0c2d 0002 50dc
beq.b L_00016e28 ; [00000001] 00016e04: 6722
move.w d0,d5 ; [00000001] 00016e06: 3a00
jsr L_00002184.w ; [00000001] 00016e08: 4eb8 2184
beq.b L_00016e28 ; [00000001] 00016e0c: 671a
addq.b #$1,-$766c(a5) ; [00000001] 00016e0e: 522d 8994
addq.b #$1,$50dc(a5) ; [00000001] 00016e12: 522d 50dc
jsr L_000026dc.w ; [00000001] 00016e16: 4eb8 26dc
bsr.w L_00016e32 ; [00000001] 00016e1a: 6100 0016
add.w d5,d5 ; [00000001] 00016e1e: da45
move.w L_00016e2a(pc,d5.w),d5 ; [00000001] 00016e20: 3a3b 5008
jmp L_00016e2a(pc,d5.w) ; [00000001] 00016e24: 4efb 5004
L_00016e28:
rts ; [00000001] 00016e28: 4e75
L_00016e2a:
dc.w L_00016ea4-L_00016e2a
dc.w L_00016ef4-L_00016e2a
dc.w L_00016fcc-L_00016e2a
dc.w L_00016f34-L_00016e2a
Reassembling this source with vasm without any changes will produce an identical program ROM and this can be reused by the modified MAME.
So what's different in the code on the Atari STE? Actually some program code below $800 has been moved to a higher address location and the exception vectors for the VBL and HBL have been hijacked. The Atari STE VBL now draws some red blocks, the JagPad/keyboard input is being processed and then it calls the original code. That's basically all.
- dlfrsilver
- Fuji Shaped Bastard
- Posts: 2305
- Joined: Mon Jan 31, 2005 1:41 am
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
there's another thing : This game takes a lot of memory, because all the game is directly accessible.Anima wrote:I think there are two issues making the source code public. First it's still not completely relocatable and (even more important) there are legal questions about the copyright. Besides that, I'd like to share it, why not.dlfrsilver wrote:Anima, do you plan to make the game code ressourced available ? Anyway that's a great idea
How much ram do the game will need on STE ? 4mb of ram ?
Regarding the memory requirement it'll need 4 MB RAM on the Atari STE for sure. The game code itself is 1 MB in size so there's not much space left for a scrolling double+background buffering. Also the sprites will take another huge chunk of RAM as well.
Are you planning to make the game loading only the needed parts for each level ? This will also allow to reduce seriously the amount of colors without making the graphics too much painful to convert in term of palette.
Now SPS France representative since the 19th of June 2014. Proud to be an SPS member !
Atari 520 STF / Atari 1040 STF / Atari 520 STE / Atari 1040 STE / Atari Falcon 030 14mb + 8gb CF
Atari 520 STF / Atari 1040 STF / Atari 520 STE / Atari 1040 STE / Atari Falcon 030 14mb + 8gb CF
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
That's right. The main problem here is to find out which tiles will be used at what stage. Sometimes sprites will be reused on later levels just only with a new palette.dlfrsilver wrote:there's another thing : This game takes a lot of memory, because all the game is directly accessible.
Are you planning to make the game loading only the needed parts for each level ? This will also allow to reduce seriously the amount of colors without making the graphics too much painful to convert in term of palette.
- dlfrsilver
- Fuji Shaped Bastard
- Posts: 2305
- Joined: Mon Jan 31, 2005 1:41 am
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
I think i can do something hereAnima wrote:That's right. The main problem here is to find out which tiles will be used at what stage. Sometimes sprites will be reused on later levels just only with a new palette.dlfrsilver wrote:there's another thing : This game takes a lot of memory, because all the game is directly accessible.
Are you planning to make the game loading only the needed parts for each level ? This will also allow to reduce seriously the amount of colors without making the graphics too much painful to convert in term of palette.
What i propose, is to make an excel file for each tile bank, and then indicate like :
Sprite level 1
Sprite level 3
Sprite level 5
Boss sprite part 1
Background level 1 Background level 5
Foreground level 2 Background level 3
I can do that puzzle, by indicating you the tile word references, that are stored inside the game code. That's easy in the capcom games. But it can also take a bit of time. but it's doable.
Oh and the best, i have started a while ago to extract each tile part, and then via a specific mame version, extract the palettes, and then use a tilemapper, which allowed me to get the tile sheets exactly like how the capcom guys have them in their archive service
on the palette side, it's going to be fun, because basically, the arcade machine is doing palette changes very often ingame. using the same thing but applied to the 16 colors palette of the ST would be very cool, graphically and technically.
Now SPS France representative since the 19th of June 2014. Proud to be an SPS member !
Atari 520 STF / Atari 1040 STF / Atari 520 STE / Atari 1040 STE / Atari Falcon 030 14mb + 8gb CF
Atari 520 STF / Atari 1040 STF / Atari 520 STE / Atari 1040 STE / Atari Falcon 030 14mb + 8gb CF
- dlfrsilver
- Fuji Shaped Bastard
- Posts: 2305
- Joined: Mon Jan 31, 2005 1:41 am
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
oh and a good new : each sprite has a fixed palette of 16 colors. The palettes changes are done on the backgrounds.
Now SPS France representative since the 19th of June 2014. Proud to be an SPS member !
Atari 520 STF / Atari 1040 STF / Atari 520 STE / Atari 1040 STE / Atari Falcon 030 14mb + 8gb CF
Atari 520 STF / Atari 1040 STF / Atari 520 STE / Atari 1040 STE / Atari Falcon 030 14mb + 8gb CF
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
Awesome project!
Anyhow, why not use the original ST versions music for the STE, it's pretty good actually for ST standards and then use the arcade versions sfx?
Then maybe the Falcon is able to playback more "advanced" music.
Anyhow, why not use the original ST versions music for the STE, it's pretty good actually for ST standards and then use the arcade versions sfx?
Then maybe the Falcon is able to playback more "advanced" music.
"4160" STE with Ultrasatan | Falcon 030 14MB with CF-reader | TT030 | STacy | 520STFM x 2 | 520ST x 2
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
Ok, that sounds interesting. Are you also able to find out which sprites/tiles will be flipped horizontally and/or vertically? This is quite important because it increases the graphics memory usage by a good margin.dlfrsilver wrote:What i propose, is to make an excel file for each tile bank, and then indicate like :
Sprite level 1
Sprite level 3
Sprite level 5
Boss sprite part 1
Background level 1 Background level 5
Foreground level 2 Background level 3
I can do that puzzle, by indicating you the tile word references, that are stored inside the game code. That's easy in the capcom games. But it can also take a bit of time. but it's doable.
In respect of the graphics I'm about to extend MAME to create images out of the sprites with a realtime mapping to a given 16 colours palette. This data will be used later on to create the compiled Blitter sprites.
That sounds like a good idea.NGF wrote:Anyhow, why not use the original ST versions music for the STE, it's pretty good actually for ST standards and then use the arcade versions sfx?
Then maybe the Falcon is able to playback more "advanced" music.
- dlfrsilver
- Fuji Shaped Bastard
- Posts: 2305
- Joined: Mon Jan 31, 2005 1:41 am
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
Well all the sprites are at least flipped horizontally in ghouls'n'ghosts. What do you plan, keeping the routine which flip the sprite frames, or do you need to have the sprites already flipped ?Ok, that sounds interesting. Are you also able to find out which sprites/tiles will be flipped horizontally and/or vertically?
Just tell what you need.This is quite important because it increases the graphics memory usage by a good margin.
that's a great ideaIn respect of the graphics I'm about to extend MAME to create images out of the sprites with a realtime mapping to a given 16 colours palette. This data will be used later on to create the compiled Blitter sprites.
That sounds like a good idea.[/quote]NGF wrote:Anyhow, why not use the original ST versions music for the STE, it's pretty good actually for ST standards and then use the arcade versions sfx?
Then maybe the Falcon is able to playback more "advanced" music.
Or transcoding the YM2151 partitions data to make the music working on the STE YM chip ?
Now SPS France representative since the 19th of June 2014. Proud to be an SPS member !
Atari 520 STF / Atari 1040 STF / Atari 520 STE / Atari 1040 STE / Atari Falcon 030 14mb + 8gb CF
Atari 520 STF / Atari 1040 STF / Atari 520 STE / Atari 1040 STE / Atari Falcon 030 14mb + 8gb CF
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
When you're certain that you can sort out the tile/sprite usage of each stage than I'll try to include all flipped sprites as well. Other assets can be loaded when the level changes.dlfrsilver wrote:Well all the sprites are at least flipped horizontally in ghouls'n'ghosts. What do you plan, keeping the routine which flip the sprite frames, or do you need to have the sprites already flipped ?
I guess the 4 MB will be filled up quite easily without a loading strategy. The ugly part is that all TOS related variables and other stuff is killed in the lower address range so I will have to restore that before getting access to the OS file functions. However, I think this will be still fast enough to be a viable solution.
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
Last edited by Anima on Sat Apr 15, 2017 11:14 am, edited 1 time in total.
-
- Atari Super Hero
- Posts: 926
- Joined: Thu Sep 11, 2003 10:49 pm
- Location: UK
Re: Daimakaimura (Ghouls 'n Ghosts) for the Atari STE
How are you going to approach the limited STE 16 colour display Anima? Will be a challenge converting...