From: Peter Trauner (peter.trauner_at_utanet.at)
Date: 2003-09-27 16:31:10
Hello , Ullrich von Bassewitz wrote: >>Since this is a console and the program is in ROM, how do I >>initialize/handle >>non const global variables? >> >> > >You must use different LOAD and RUN addresses and copy the variables from ROM >into the RAM. For a standard DATA segment, there's a routine named copydata in >the library which does exactly this - you will have to call it in your startup >file. > > Done (shorter than the other version, same linker config). >>I have 4 linker configuration files for 16, 32, 64, 128kbyte cartridges >>(64, 128kbyte are bankswitched). >>Is it allowed to support several supervision targets? >> >> > >I would prefer not to have more than one builtin config per platform, so you >will have to choose the most common one. It is not more difficult for a user >to say "-C sv128.cfg" on the command line instead of "-t sv-128". The reason >for the builtin configurations is not to save the user the trouble to use >configuration files at all. > > Ok. >>PS: I attached my work files >>(how must I deliver/integrate supervision support in cc65?) >>(some remarks about my first cc65 usage?) >> >> > >[Next time, please place the files somewhere onto a web or ftp server and just >post a link.] > I see it from the point of a modem user who grabs his emails and goes offline for reading. And I thought a 10kbyte attachment is short enough for direct attachment. >As far as I can see, there are several smaller issues with the files, but >nothing serious: > > 1. Assembler files are named xxx.s, not xxx.asm > Done. > 2. All upper case names are used for #defines, structs shouldn't use it. > > Ok, switched myself to plain C mode. > 3. Some stuff is already available in the library and should be reused (like > hex2asc). > This was in my common.asm for my first assembler based stuff and programs. > 4. I prefer not to have code commented out. If it is not needed, remove it, > if it is needed, enable it. Especially .if/.ifdef is ugly and problematic > to maintain, because some code path is not executed and tested when > making changes. > > But sometimes it is needed in my opinion. (I will label some of my .if clauses, and removed some code) Like plain reset/irq/nmi vectors for 16kbyte cartridges and extended vectors with a short reset routine to activate the correct bank before executing code in the $8000-$bfff area for 32kbyte cartridges. > 5. Some stuff is targeted for the 2.9 versions and should be adapted to work > with the head branch. > How do I get access to the cvs tree? (internet address, id, password; cvs project name; read only access is ok)? > 6. Not sure about the functions in common.asm: I don't like the idea to have > functions that are similar to the ones from conio but with other names > and prototypes. > These is my private pure assembler stuff (not to be included in cc65). > 7. I prefer not to have unneeded types and defines like "byte" and "word" > defined in some header file, because this may collide with identifiers > used by a program. This is especially true for "true" and "false" because > for C99 these are even in the standard. In general: Since you are on the > "other side" of the code (you are writing an implementation, not a > program), please try to be as careful as possible when introducing new > types and names: Someone may have a program that does already use the > types/names in question. > Did a look into the header files. I have been surprised to find some c99 stuff. I will use common types, names, defines where possible. For the supervision code it is enough to work in cc65 in my opinion. (and I don't expect many libraries to be usable for the supervision). > 8. A few structural changes to the headers to make them similar to the > existing ones would be nice. > > Added header note. >Anything mentioned above assumes inclusion into the main cc65 package - if >you're planing to distribute your files separately, only 5. and maybe 7. is of >relevance. > > I don't plan large supervision developements. It would be nice to have basic supervision support in cc65. Do you plan to add bit notation support? "struct { unsigned char bank:3, prescaler:1, lcd_on:1, irq_dma_on:1, irq_timer_on:1, nmi_on:1 };" Do you plan to add optimizations for "(const?const:const)|(const?const:const)" ? 2nd try at http://de.briefcase.yahoo.com/grumpfix/public/sv11.zip In my opinion 32kbyte cartridge support buildin would be optimal. (and please include all 4 config files) I don't know if there is a good place for stub.s (default starting point for assembler users). I don't know if there is a good place for the technical summary. Peter ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-09-27 16:57:55 CEST