Gimmee99 Posted Wednesday at 12:15 PM Share Posted Wednesday at 12:15 PM Giddy up !! I’ll try the export first. If I get stuck on that I can send some info. It’s essentially main.s from the first attachment in that galas thread that playsoft wrote a couple of years ago. Thanks much, Scott 1 Quote Link to comment Share on other sites More sharing options...
Gimmee99 Posted Wednesday at 01:59 PM Share Posted Wednesday at 01:59 PM (edited) 7 hours ago, popmilo said: Ags has export to xex file that has "press space to exit" coded in. Maybe you could just insert that binary code into your project ? Otherwise it's easy to show such screen, display list, setup colors based on image palette, set gtia to that mode and load image data into bitmap specified by display list. If you can, send here or in pm your data and example asm you already have. Code will depend on your memory layout etc... Ok, I've gotten educated about the export options in AGS thanks to you and tebe. So I am closer. My next hurdle is this. 1. I don't know how to insert an existing binary into my current project the right way. 2. I see that AGS allows for an export to ASM file which is super curious. But i think it uses the MADSassembler syntax and the old Galaga project is using CL65 or whatever that one is called. So I cant just "use the asm" file in my existing project. At least when i try, i get a zillion syntax errors. I don't know how much work it is to fix the syntax differences. It looks like they are not THAT different, so I will probably start trying to do that. If anyone knows a conversion tool, or an easier way, I am all ears. thanks again, Scott Edited Wednesday at 02:04 PM by Gimmee99 1 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted Thursday at 08:20 AM Share Posted Thursday at 08:20 AM 18 hours ago, Gimmee99 said: But i think it uses the MADSassembler syntax and the old Galaga project is using CL65 or whatever that one is called. So I cant just "use the asm" file in my existing project. At least when i try, i get a zillion syntax errors. Most of the disassembled code should be ok in CA65, one of the main differences is CA65 uses a ':' after a line label i.e. mytable: .byte ,1,2,3,4,5,6 where as MADS uses mytable .byte 1,2,3,4,5,6 also the program counter MADS:- org $2000 CA65:- .org $2000 you may find a few other differences, but shouldn't take long to fix those, I would think the above are causing most errors. As this is a disassembly you don't have to worry about macro's which again would probably need some work. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted Thursday at 09:14 AM Share Posted Thursday at 09:14 AM MADS is fine with the : after a label Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted Thursday at 11:08 AM Share Posted Thursday at 11:08 AM 1 hour ago, Wrathchild said: MADS is fine with the : after a label Didn't know that, thanks, even so, the disassembler he's using is probably not putting the ':' there, so CA65 will complain. Quote Link to comment Share on other sites More sharing options...
Gimmee99 Posted Thursday at 12:24 PM Share Posted Thursday at 12:24 PM 3 hours ago, TGB1718 said: Most of the disassembled code should be ok in CA65, one of the main differences is CA65 uses a ':' after a line label i.e. mytable: .byte ,1,2,3,4,5,6 where as MADS uses mytable .byte 1,2,3,4,5,6 also the program counter MADS:- org $2000 CA65:- .org $2000 you may find a few other differences, but shouldn't take long to fix those, I would think the above are causing most errors. As this is a disassembly you don't have to worry about macro's which again would probably need some work. Thanks. Are you saying the attached (which is what AGS exported as ASM) is already disassembled enough to be close. Because based on my VERY limited use of the other syntax, there is a bunch of differences to my eye. Also the export does actually use colons for the line labels. I mean i see all kinds of things like wait and mva and such that I didn't think were part of the C65 stuff? Do I need to take another step to get a starting file that is closer? title.asm Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted Thursday at 02:19 PM Share Posted Thursday at 02:19 PM That looks like original code, not a disassembly, my mistake, I put it in MADS and only got 2 errors, it needs to read in 2 files during the assembly, not sure how CA65 does the same, but you will need those files for it to compile .get 'title.dat',-9 ; palette ins 'title.dat',0,8000 Quote Link to comment Share on other sites More sharing options...
sanny Posted Thursday at 02:23 PM Share Posted Thursday at 02:23 PM 6 hours ago, TGB1718 said: also the program counter MADS:- org $2000 CA65:- .org $2000 .org is not the same on cc65 as on other assemblers. Quote Link to comment Share on other sites More sharing options...
Gimmee99 Posted Thursday at 07:40 PM Share Posted Thursday at 07:40 PM 5 hours ago, TGB1718 said: That looks like original code, not a disassembly, my mistake, I put it in MADS and only got 2 errors, it needs to read in 2 files during the assembly, not sure how CA65 does the same, but you will need those files for it to compile .get 'title.dat',-9 ; palette ins 'title.dat',0,8000 When you export from ags you get the asm file AND the dat file. I just didnt attach it. Its no problem to get this assembled and linked by something OTHER than CA65. Unfortunately, I need the equivalent code in something the CA65 CAN assemble, because the other 20 source files that I am using are already in that format. Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted Thursday at 08:28 PM Share Posted Thursday at 08:28 PM I had a go assembling in ca65 and I see what you mean, so many errors, I had a look through them and it's going to be a bit of a nightmare to resolve the differences, usually there's quite a bit of commonality in assemblers for instance code I wrote bitd using MAC/65 was so easy to port directly to MADS with very few changes. But ca65 seems to buck that rule, probably because it can integrate assembler directly into its C modules and linker. Quote Link to comment Share on other sites More sharing options...
Gimmee99 Posted Friday at 03:14 AM Share Posted Friday at 03:14 AM I think there is some hope since more than 50% of the code in the exported ASM file is not needed. I can get rid of all the if else code that is there for anything other than graphics 10, which is the only image type I would load. That gets the source file down to a much more manageable amount but I’ll still have to figure out what the equivalent ca65 instructions are for all the mads macros. Some are pretty easy like the MVA macro, which is just a load and store operation but some of the others may be way more complicated. In the end, it might just be easier to start from scratch with the CA 65 syntax and try to figure out how to specify graphics mode 10 and load and display the graphic. 1 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted Friday at 11:21 AM Share Posted Friday at 11:21 AM I noticed the enum is quite different too, instead of a comma separated line you have to put each element on a separate line .enum __ftype mic inp ist . . . tip .endenum and to access any element use the double '::' .if (ftype=__ftype::inp)||(ftype=__ftype::ist).... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.