Castle Defender -> Atari conversion
Castle Defender -> Atari conversion
Hi,
I would like to perform Atari XL/XE conversion of Castle Defender.
I have managed to export the data from .ssd disk and I have been playing around with the contents...
Both machines are based on 6502 cpu, so the game logic might be preserved/transferred w/o changes.
However Atari has slightly lower cpu clock (1.79 MHz)... and the main change is the structure of video ram.
Atari has nothing like Mode 1 (320x256x4), the closest matching mode is (320x192x2).
On Atari video ram is sequential, meaning 1 scanline consists of 40bytes (40*8 = 320) which are sequentially stored in memory.
I can see that BBC Micro on the other hand stores video data in 8byte chunks (in case of Mode 1 it is in two 8byte chunks) which could be represented in text mode of Atari, which uses similar memory structure).
So I wrote small utility which converts gfx data by ORing the 2 color bytes (to reduce color palette from 4 colors to 2) which should represent your Mode 4...that is quite close to what Atari can do.
However I can see there are some additional data in L.1 file at the beginning, so the resulting image is not correctly aligned:
@ChrisB: could you let me know what is stored at the beginning of the L.1 file? I have already disassembled the code, however it would be great if you could be kind to provide me the sourcecode, so I would not need to reverse engineer everything.
I would like to perform Atari XL/XE conversion of Castle Defender.
I have managed to export the data from .ssd disk and I have been playing around with the contents...
Both machines are based on 6502 cpu, so the game logic might be preserved/transferred w/o changes.
However Atari has slightly lower cpu clock (1.79 MHz)... and the main change is the structure of video ram.
Atari has nothing like Mode 1 (320x256x4), the closest matching mode is (320x192x2).
On Atari video ram is sequential, meaning 1 scanline consists of 40bytes (40*8 = 320) which are sequentially stored in memory.
I can see that BBC Micro on the other hand stores video data in 8byte chunks (in case of Mode 1 it is in two 8byte chunks) which could be represented in text mode of Atari, which uses similar memory structure).
So I wrote small utility which converts gfx data by ORing the 2 color bytes (to reduce color palette from 4 colors to 2) which should represent your Mode 4...that is quite close to what Atari can do.
However I can see there are some additional data in L.1 file at the beginning, so the resulting image is not correctly aligned:
@ChrisB: could you let me know what is stored at the beginning of the L.1 file? I have already disassembled the code, however it would be great if you could be kind to provide me the sourcecode, so I would not need to reverse engineer everything.
Re: Castle Defender -> Atari conversion
Sorry, I can't help with the data, but have PMed Chris, yours will be activated after I think 25 posts.
I would love to see more ports between the two.
I think the Atom would also be a good candidate and I think that the memory map is much closer and hardware more basic (6847 based).
I have written a couple of "emulators" for running Atari arcade ROMs on the beeb, but I think the micro games might be more interesting.
URL:https://youtu.be/enupZbjSNck View at 720p+ for 50hz.
URL:https://youtu.be/yCnRqDsB8p4 View at 720p+ for 50hz.
I would love to see more ports between the two.
I think the Atom would also be a good candidate and I think that the memory map is much closer and hardware more basic (6847 based).
I have written a couple of "emulators" for running Atari arcade ROMs on the beeb, but I think the micro games might be more interesting.
URL:https://youtu.be/enupZbjSNck View at 720p+ for 50hz.
URL:https://youtu.be/yCnRqDsB8p4 View at 720p+ for 50hz.
Re: Castle Defender -> Atari conversion
I've activated PM's for you.
Re: Castle Defender -> Atari conversion
@sydney: thanks
@tricky: there are several BBC Micro games already converted to Atari: http://a8.fandal.cz/search.php?search=b ... etails_x=x
@tricky: there are several BBC Micro games already converted to Atari: http://a8.fandal.cz/search.php?search=b ... etails_x=x
Re: Castle Defender -> Atari conversion
Wow, I’d heard about Spycat, but I didn’t know there were so many other Beeb-to-Atari conversions!matosimi wrote: ↑Mon Nov 26, 2018 2:05 pmthere are several BBC Micro games already converted to Atari: http://a8.fandal.cz/search.php?search=b ... etails_x=x
Were you involved with all of them? Why did you choose Beeb games in particular to convert (apart from the fact that the Beeb and the Atari both have a 6502)?
Last edited by lurkio on Mon Nov 26, 2018 4:02 pm, edited 1 time in total.
Re: Castle Defender -> Atari conversion
I was not, but I know Fandal in person... so I was quite aware of what he has done already; anyway this game would be my first
Why? because of the same CPU, because Beeb does not have HW sprites or anything like that, so all is done SW way... (that's why C64 games could not be converted easily between other 6502-based platforms)
Re: Castle Defender -> Atari conversion
Yes - I did receive the PMs. The 1972 bytes before the screen are the path the enemies take (all pre-calculated - there's a lot of that) and the 32 bytes before that are the locations of the Towers. I'll see what can be done with the source code - it was never really meant for public consumption - give me a few days...
Last edited by ChrisB on Mon Nov 26, 2018 8:34 pm, edited 1 time in total.
Castle Defender, Untitled Dungeon Game, Night Ninja, Wordle, Waffle, Acorn Island, Beebchase, Ghostbusters
Re: Castle Defender -> Atari conversion
thanks for info.ChrisB wrote: ↑Mon Nov 26, 2018 8:33 pm Yes - I did receive the PMs. The 1972 bytes before the screen are the path the enemies take (all pre-calculated - there's a lot of that) and the 32 bytes before that are the locations of the Towers. I'll see what can be done with the source code - it was never really meant for public consumption - give me a few days...
I'm glad you are willing to help me. Regarding the sources, do not worry about it. I really dont need a lot of explanations or comments. The thing that will help me the most would be the labels, especially zero page and labels of inline data.
So dont waste your time to comment the code for me, i will need to rewrite all drawing routines anyway... and also I will need to replace all HW calls incl. disk accesses.
Re: Castle Defender -> Atari conversion
Hi,
after some time, i was able to dig into CD code (since 2 days ago) and now I have running game on Atari Xl/Xe.
I had to remove all disk loads and interrupt stuff and replace them by direct data blocks (inline data).
Controls are not yet handled.
Video output looks like this: I know it is maybe not what you have expected, but the videoram has different structure on BBC Micro than on Atari.
Good message is that the code is running, towers are being drawn, sprites are NOT being drawn (i had to cheat the sprite loading routine) and after some time the the "Defeat!" message is shown.
So my next steps are to fix sprite (enemy) loading and after that I can start with all gfx data conversions and drawing routines adjustments.
after some time, i was able to dig into CD code (since 2 days ago) and now I have running game on Atari Xl/Xe.
I had to remove all disk loads and interrupt stuff and replace them by direct data blocks (inline data).
Controls are not yet handled.
Video output looks like this: I know it is maybe not what you have expected, but the videoram has different structure on BBC Micro than on Atari.
Good message is that the code is running, towers are being drawn, sprites are NOT being drawn (i had to cheat the sprite loading routine) and after some time the the "Defeat!" message is shown.
So my next steps are to fix sprite (enemy) loading and after that I can start with all gfx data conversions and drawing routines adjustments.
Re: Castle Defender -> Atari conversion
Well done, hard bit done
Re: Castle Defender -> Atari conversion
Finally the original game code is running properly...
Re: Castle Defender -> Atari conversion
Looking good.
How far can you get
How far can you get
Re: Castle Defender -> Atari conversion
Well done!
Castle Defender, Untitled Dungeon Game, Night Ninja, Wordle, Waffle, Acorn Island, Beebchase, Ghostbusters
Re: Castle Defender -> Atari conversion
Thanks
Current issue is that i have to convert all the assets to something like MODE4, which means that all sprites have to be preshifted to 8 positions instead of 4.
Also towers which are placed on odd x-position have to be preshifted and masked in order to put them nicely on desired spots in the map.
ATM I'm working on correct tower placement/look.
Re: Castle Defender -> Atari conversion
another iteration: converted background, converted tower sprite incl.masking
Re: Castle Defender -> Atari conversion
enemy sprites drawn correctly...
Re: Castle Defender -> Atari conversion
Looking great
PS what do you use to make the gifs?
PS what do you use to make the gifs?
Re: Castle Defender -> Atari conversion
(bullets drawing not yet converted, tower upgrades drawing not converted as well, hit sprite variation not adapted yet)
Re: Castle Defender -> Atari conversion
finally i've found some time to dive into the "bullet storm".
good news is that bullets so so work, but some position adjustments would need to be applied... also bullet masking is required, otherwise they look quite bad
good news is that bullets so so work, but some position adjustments would need to be applied... also bullet masking is required, otherwise they look quite bad
Re: Castle Defender -> Atari conversion
bullets, hitsprites, explosions working
Last edited by matosimi on Sun Feb 10, 2019 8:49 am, edited 1 time in total.
Re: Castle Defender -> Atari conversion
status bar works, however it does not fit to Atari screen (Atari does not have resolution with 256 scanlines), so I'm working on some alternative solution at the moment
also added +1 color/luminance by using PMG(sprite) overlay (I had to code additional editor for this)
Re: Castle Defender -> Atari conversion
Looks great, isn't there room at the sides?
Re: Castle Defender -> Atari conversion
Yes, it is. However the emulated gfx mode does not allow me to use them, so I can (will) put there 2 column sprites (1 left to the main screen, 1 right) with the status info.
i have some mockups already, but I will share after i develop the final look.
Last edited by matosimi on Tue Mar 12, 2019 11:59 am, edited 1 time in total.
Re: Castle Defender -> Atari conversion
Looking really good. The luminance really lifts the look.
Castle Defender, Untitled Dungeon Game, Night Ninja, Wordle, Waffle, Acorn Island, Beebchase, Ghostbusters
Re: Castle Defender -> Atari conversion
status bars are working
Re: Castle Defender -> Atari conversion
Looks great.
I think the beeb might be the only 8-bit with 256 vertical resolution.
I think the beeb might be the only 8-bit with 256 vertical resolution.
- José Pereira
- Posts: 1
- Joined: Wed Mar 20, 2019 2:19 pm
- Contact:
Re: Castle Defender -> Atari conversion
Hi to all because I'm new here though not for Atari 8bits people ...
I saw the game at AtariOnline and looking really good.
I would just suggest that you could DLI to have PF1 dark gray (04) and PF2 white (0E) for the bottom panel and same as for the road you could use the same 4Players (as you seem to be using 2+2 Missiles in 5th Player PF3 colour register on the sides) to have creatures and right numbers in gray (0C) or (0A).
It would look something like this:
I saw the game at AtariOnline and looking really good.
I would just suggest that you could DLI to have PF1 dark gray (04) and PF2 white (0E) for the bottom panel and same as for the road you could use the same 4Players (as you seem to be using 2+2 Missiles in 5th Player PF3 colour register on the sides) to have creatures and right numbers in gray (0C) or (0A).
It would look something like this:
Last edited by José Pereira on Wed Mar 20, 2019 3:02 pm, edited 1 time in total.