Re: [cc65] Supervision support

Date view Thread view Subject view

From: Peter Trauner (peter.trauner_at_utanet.at)
Date: 2003-09-24 06:35:21


Hello gpz,

Sorry for the delay, but I thought it is better to download the
actual snapshot and take a closer look as suggested by you.

>care to explain what it is? never heard of that one :o)
>  
>

Gameboy style handheld, but w65c02s cpu clocked at 4Mhz, hires 4 greys
160x160 lcd, ...
(details in technical summary, there are also 2 faqs available in the web)

>>I looked a little bit on the compiler and started to add supervision c
>>support.
>>
>>Since this is a console and the program is in ROM, how do I
>>initialize/handle
>>non const global variables?
>>    
>>
>
>write a linker config that puts everything into rom, except the .bss and .data 
>sections (which should be in ram) (if you dont have any ram at all - you have 
>problems :=P)
>  
>

8 kbyte + 8kbyte for video.

>you may want to look at the NES port (which is available in the development 
>version) - looking at the code/linkerconfig might solve some of your 
>questions.
>  
>

Thanks, based my data init on your one (and will look at the library 
function mentioned by Uz)

>>Is it safe to call c functions from irq, nmi?
>>    
>>
>
>no - (not entire true, its very "hard" and features lot of overhead)... the 
>general rule is to write that stuff in assembler.
>
>if you really think you want to do this in C (you dont, believe me :=)), look 
>at the code of the debug library....somewhere in there is a brk-handler that 
>calls a C function.
>

I read the explaination in the faq. (I have been afraid about this).

>>Is it allowed to support several supervision targets?
>>    
>>
>
>maybe you also want to look at the atari stuff and see how they support 
>several different targets with just one config? having several configs for 
>the same target (ie, computer) would probably be kinda overkill... (offhand, 
>i could probably come up with 10+ configs just for the c64 :=))

Didn't find something special in snapshot 2.9.5 and atari.

>>(some remarks about my first cc65 usage?)
>>    
>>
>
>after a quick look.... seems to be ok overall... some tips though
>
>- have a look at the conio-interface and design your screen i/o stuff like 
>that... might make some things easier in the future
>

I will look at it.

>- use seperate files for each function, that will reduce the overhead when 
>linking a larger library 
>  
>

Ok. I haven't splitted common into common and draw stuff yet.
(splitting into 1 function in 1 file is overkill in my opinion).

Peter



----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-09-24 07:02:05 CEST