Jump to content
IGNORED

GTIA mode 10 (and 11)


mutil8

Recommended Posts

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 by Gimmee99
  • Like 1
Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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)....

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...