Jump to content
IGNORED

How to use conio.h with CC65 for the A5200?


Recommended Posts

I am trying to write an ATARI 5200 version of my cross-system 8 bit game:
https://github.com/Fabrizio-Caruso/ASCII-CHASE

(which already supports most 8 bit Z80 and 6502-based computers)

I have managed to compile my code with CC65 for the Atari 5200 target by using conio.

(I was wrongly using keyboard input on a keyboardless console...).

My problem now is:
- how to use the binary created by CC65? Can I use it as it is? Which extension should I use? Should I use it as a cartridge?

- how to set up the emulator? Which rom? Atari800Win with the 5200 rom goes straight to the debugger when started.

Edited by Fabrizio Caruso
Link to comment
Share on other sites

Hi,

 

While I cannot help with 5200 target I may provide another hint - do not use structs nor pointers when you do programming for 6502 in C for example here

https://github.com/Fabrizio-Caruso/ASCII-CHASE/blob/master/character.h

6502 processor cannot work effectively with such constructs and it will lead to code size bloat and performance drop.

Instead of pointers use just indexes like this e.g. http://www.cc65.org/mailarchive/2010-09/8593.html. Pointer would make sense only for dynamically allocated memory and it should be totally avoided on this platform ;)

Also highly recommended is not to use recursion in the code so in CC65 you can use -Cl (Make local variables static) - it's a big performance boost.

 

If you are interested in sources of CC65 games here is one I created: http://atariage.com/forums/topic/241598-the-hunt-from-abbuc-2013-cc65-source-code/

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