"Simon Williams" wrote in message news:1ga9zor.1riws1xqmnebkN%see_sig_for_valid_email@no.spam... > Glenn Jones wrote: > > > Has anybody else figured out what the problem is with highlighted text > > (Inverse) on the Apple II port of Contiki? > > There's an Apple II port of Contiki??? > Details... ? > -- > T____I____M____E____L____O____R____D > | Apple II Drum & Bassline Sequencer | > | < http://apple2.luddite.ca > | > |_[email]__[@]__[luddite]__[.]__[ca]_| I think there has been for quite awhile but with no network support I guess it was never updated on Adams site? I used the V1.0 source. The 1.1 archive does not seems to support the Apple II directly anymore ...anyway I went with the older version All I did was download the V1.0 source, cc65 and a windows make binary. I looked through Google and found previous posts from Chris and others about the problems they encountered and I applied their suggestions to the source code and was able to compile it. The screen shot you see is that code running on kegs. Lets see ..I found and applied the following info 1) I modifed the apple2.h file in /cc65/include/apple2.h from #define CH_CURS_DOWN 0x0A to #define CH_CURS_DOWN 0x0D 2) I added the following code to /contiki/ek.dispatcher.c /*-------------------------------------------------------------------------- ---------*/ clock_t clock(void) { static clock_t fake; return fake++; } /*-------------------------------------------------------------------------- ---------*/ 3) I added the constant #define CLK_TCK 1 to /contiki/arch/cc65/ctk-conio.h (I know this is wrong and havn't bothered to figure out the correct value yet) I think that was about it ... I used Ciderpress to add the resulting binary to a PRODOS 140K disk image. Make the type BIN. I have run it on AppleWin and Kegs. Under prodos you need to bload contiki,a$800 then call-151 and do a 7FC<800.5000M .... 800G Next on the list is the inverse problem ....I could not find anything on the various mailing lists or Goolge about that so far. btw it works in 40 or 80 column mode Glenn Glenn Jones wrote: > "Simon Williams" wrote in message > news:1ga9zor.1riws1xqmnebkN%see_sig_for_valid_email@no.spam... > >>Glenn Jones wrote: >> >> >>>Has anybody else figured out what the problem is with highlighted text >>>(Inverse) on the Apple II port of Contiki? >> Contiki has a status line/menu bar across the top of the screen. That doesn't seem to be written correctly in your screen shot. I'd bet that that is what is causing the problem. > > I think there has been for quite awhile but with no network support There is no network support because there is no support in cc65 or any network devices or for the apple serial port for slip. There may be some function missing from the Apple ][ libraries in cc65. Perhaps you could build a driver for your ethernet card, you seem pretty close to getting it to work. > I guess it was never updated on Adams site? Maybe you can send him your screen shot and he can update the site. > I used the V1.0 source. The 1.1 archive > does not seems to support the Apple II directly anymore ...anyway I went > with the older version I wonder why?. Did you try to compile it? As far as I could tell the only thing necessary to compile under cc65 was to tell it you wanted an Apple ][ binary. > All I did was download the V1.0 source, cc65 and a windows make binary. I > looked through Google and found previous posts from Chris and others about > the problems they encountered and I applied their suggestions to the source > code and was able to compile it. The screen shot you see is that code > running on kegs. > > Lets see ..I found and applied the following info > > 1) I modifed the apple2.h file in /cc65/include/apple2.h from #define > CH_CURS_DOWN 0x0A to #define CH_CURS_DOWN 0x0D This corrects something in the cc65 library. > 2) I added the following code to /contiki/ek.dispatcher.c > /*-------------------------------------------------------------------------- > ---------*/ > clock_t clock(void) > { > static clock_t fake; > return fake++; > } > /*-------------------------------------------------------------------------- > ---------*/ This for a function missing in the cc65 apple ][ libraries. There is a function in the C64 which generates a clock signal. It is used by Contiki for networking timeouts. To get networking to work you may need to elaborate this function. Ideally add it to the cc65 Apple ][ library. The problem is that there are many ways to do and it depends on the hardware in the apple. Your ethernet card may also have something with these functions built into it. > 3) I added the constant #define CLK_TCK 1 to /contiki/arch/cc65/ctk-conio.h > (I know this is wrong and havn't bothered to figure out the correct value > yet) I believe that this will be a trial and error, and will depend on the actual implementation of the timing loop and the hardware. > > > I think that was about it ... I used Ciderpress to add the resulting binary > to a PRODOS 140K disk image. Make the type BIN. I have run it on AppleWin > and Kegs. Under prodos you need to bload contiki,a$800 then call-151 and do > a 7FC<800.5000M .... 800G > > Next on the list is the inverse problem ....I could not find anything on the > various mailing lists or Goolge about that so far. > > btw it works in 40 or 80 column mode > > Glenn > I hope this helps. Thanks for posting this I tried to do this when Contiki first came out but my 6502 and C knowledge was inadequate. -- Rob "Never ascribe to malice that which can adequately be explained by stupidity." Glenn Jones wrote: >> Okay .. I have a nasty patch worked out that lets Contiki display inverse >> upper and lower case characters in 80 column mode under kegs... been >> cranking on this tiny little patch for a few hours ..it's amazing what you >> forget over the years... >> >> I ended up writing a little code to detemine if the character was >uppercase >> or lowercase and applying the appropriate flag as required. You must use >the >> alternate character set $C00F softswitch (inverse lowercase replaces >> flashing characters) -- thanks Steve "uso" :O) >> >> The patched code is part of the cc65 apple2 library support .. not contiki >> .... a proper solution needs to be worked out ... If the problem is getting the screen to look like what the C source says it should, then it sounds like patching the cc65 apple2 library is exactly the right thing to do. The problem is figuring out how a C programmer should be able to control the various video character sets that the later Apple IIs make available. For example, if C uses an embedded control character in a string to shift from normal to inverse text, independent of case, then your library patch sounds right. If the C programmer is expected to call auxiliary routines to switch character sets, then that's the way to go. Since the Commodore machines also have alternate sets, no doubt someone has already picked a style for C to use. If it's not too wierd, extending the same mechanism to the Apple II sounds right. A related example is the "high ASCII" issue. If the C programmer expects low ASCII for portable code, then the apple2 library should OR on the high bit (perhaps based on a character set mode variable). -michael Check out amazing quality sound for 8-bit Apples on my Home page: http://members.aol.com/MJMahon/ >>>>> "MJM" == Michael J Mahon writes: MJM> For example, if C uses an embedded control character in a string MJM> to shift from normal to inverse text, independent of case, then MJM> your library patch sounds right. If the C programmer is expected MJM> to call auxiliary routines to switch character sets, then that's MJM> the way to go. conio uses the revers() call to enable or disable reverse printing. MJM> A related example is the "high ASCII" issue. If the C programmer MJM> expects low ASCII for portable code, then the apple2 library MJM> should OR on the high bit (perhaps based on a character set mode MJM> variable). cc65 translates C source ascii strings into whatever the target plat- form expects (e.g. PETSCII for CBM machines). If the translation for reverse Apple II characters is broken, take a look at: cc65/libsrc/apple2/cputc.s and in particular: putchar: ora #$80 ; Turn on high bit and TEXTTYP ; Apply normal, inverse, flash ldy CH ldx RD80COL ; In 80 column mode? bpl col40 ; No, in 40 cols pha tya lsr ; Div by 2 tay pla bcs col40 ; odd cols go in 40 col memory sta PG2ON col40: sta (BASL),Y sta PG2OFF rts and send Uz a patch to fix it. -- ___ . . . . . + . . o _|___|_ + . + . + . Per Olofsson, arkadspelare o-o . . . o + MagerValp@cling.gu.se - + + . http://www.cling.gu.se/~cl3polof/ "Glenn Jones" wrote in message news:... > The latest source code can be found off the download link on the > www.cc65.org web site. It is the bz2 file in the main download directory. I got the Bz2 unzipper program and was able to unzip the file. It is some format my computer doesn't recognize, but I can view source with some garbled characters with a text viewer. I can see the C64 code for Rs232. I don't see any problem with doing an Apple II serial driver. The code is straight foward and easy to understand. now to try an Apple II version......and get it compiled/tested. I don't know the procedure for incorporating my changes into cc65. once the changes are incorporated into cc65, I can test the driver by sending/receiving data to/from my rs232 robot controller board. What would the next step be to get tcp/ip working? I'll work tonight on the rs232 driver (apple II). I'd like to find out what it would take to get the apple II on the TCP/IP network once serial access is available. Would I just have to compile the Contiki tcp/ip programs, or will changes have to be made? Has anyone else done any work on this? Later! Rich "Rich J." wrote in message news:370265cd.0403122009.7b382a7a@posting.google.com... > "Glenn Jones" wrote in message news:... > > The latest source code can be found off the download link on the > > www.cc65.org web site. It is the bz2 file in the main download directory. > > > I got the Bz2 unzipper program and was able to unzip the file. It is > some format my computer doesn't recognize, but I can view source with > some garbled characters with a text viewer. Under windows, the web page I pointed you to has a windows command line executeable that will unbzip the file to a tar file ...from there I use winzip. Under Linux (Fedora for example) a bzip binary is included and you can unzip the archive from gnome file explorer ... I downloaded and built both the tools and the apple2 libraries under linux today ... I am also trying the same thing under cygwin for windows now ... > > I can see the C64 code for Rs232. I don't see any problem with doing > an Apple II serial driver. The code is straight foward and easy to > understand. > > now to try an Apple II version......and get it compiled/tested. I > don't know the procedure for incorporating my changes into cc65. On the cc65.org web site there is a blurb about how to contribute back to Ullrich > > once the changes are incorporated into cc65, I can test the driver by > sending/receiving data to/from my rs232 robot controller board. What > would the next step be to get tcp/ip working? >I'll work tonight on > the rs232 driver (apple II). I'd like to find out what it would take > to get the apple II on the TCP/IP network once serial access is > available. Would I just have to compile the Contiki tcp/ip programs, > or will changes have to be made? > > Has anyone else done any work on this? Just started tonight... :O) I just spent an hour or two trying to get all the stuff to compile ... I will send you a fresh snapshot of my contiki and cc65 .. Hi - level ....I copied the make file for the c64-rs232 and made changes ...compare makefile.apple2 with the new makefile.apple2-rs232 I worked my way through each file that died during the compile and resolved the issue so that it compiled ...may not execute 100% ...we'll see uip is compiled and I included simple telnet .. I had to exclude www as I ran into link size error and I havn't had time to look at it yet. All that is missing now is the 4 serial routines cl65 -Ln labels -o contiki -t apple2 contiki-main.o strncasecmp.o petsciiconv.o contiki.o programs.o ctk-conio.o ctk.o ek.o dispatcher.o uip.o uip_arch.o uip_ma in.o resolv.o rs232dev.o simpletelnet.o telnet.o Unresolved external `_rs232_get' referenced in: rs232dev.s(14) Unresolved external `_rs232_init' referenced in: rs232dev.s(12) Unresolved external `_rs232_params' referenced in: rs232dev.s(13) Unresolved external `_rs232_put' referenced in: rs232dev.s(15) ld65.exe: Error: 4 unresolved external(s) found - cannot create output file It still may not work after you write those four routines but I think we are off to a good start if you can get that going. look at the rs232.s file in the c64 library source to get an idea of what the requirements are. Cheers ... > > Later! > > Rich "Alistair J Ross" wrote in message news:pan.2004.09.14.22.59.15.132977@ataliross.co.uk... > Hi, > > Feeling lazy so this is 2 questions in 1 post: ... > 2) Has anyone seen this Contiki thing? > [http://www.sics.se/~adam/contiki/]. It looks cool - a proper OS for > memory limited machines. It does a lot for not a lot, and I'd love to get > it working on an Apple II or maybe my C64. Has anyone actually done this > with their machine(s), and how did you get it happening? > > Regards, > > Alistair Ross Hi Alistair, The Contiki issue has been discussed a couple of times. Currently, there is a working port that can surf the Internet using a prototype Ethernet card. Here are the relevant Google links: http://groups.google.ca/groups?hl=en&lr=&ie=UTF-8&safe=off&selm=20040529020606.09638.00000111%40mb-m11.aol.com Slighter older discussion of that particular project, but with more detail: http://groups.google.ca/groups?hl=en&lr=&ie=UTF-8&safe=off&selm=LLU0c.87478%24Qg7.81791%40news04.bloor.is.net.cable.rogers.com&rnum=8 Contiki update: http://groups.google.ca/groups?hl=en&lr=&ie=UTF-8&safe=off&selm=20040329213831.19539.00000260%40mb-m20.aol.com Cheers Tim