TGB1718 Posted June 10, 2023 Share Posted June 10, 2023 (edited) 20 hours ago, TGB1718 said: If you use CIO to clear the screen you will probably end up with 2 cursors I think that's the reason, the original cursor and the one you put in place I tried messing with ROWCRS and COLCRS, but for some reason it didn't want to play games. Edited June 10, 2023 by TGB1718 Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 10, 2023 Author Share Posted June 10, 2023 Try setting ROWCRS and COLCRS before clearing the screen. Quote Link to comment Share on other sites More sharing options...
sanny Posted June 12, 2023 Share Posted June 12, 2023 On 6/10/2023 at 10:41 AM, Irgendwer said: @sanny? clrscr() is part of the conio library which is optimized for speed. 1 Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 12, 2023 Author Share Posted June 12, 2023 I can write a version for AtaSimpleIO optimized for size. Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted June 13, 2023 Share Posted June 13, 2023 9 hours ago, Harry Potter said: I can write a version for AtaSimpleIO optimized for size. I know you have an obsession for writing smaller code, but unless your writing a program that's not going to fit in the RAM available (personally never reached that point, (well maybe once)) I think most people want best performance over size. How about re-writing for MAX performance Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted June 13, 2023 Share Posted June 13, 2023 (edited) 10 minutes ago, TGB1718 said: How about re-writing for MAX performance Isn't that typically app specific. Simple example, if cart based the you could utilise massive unrolled loops wheras might avoid that on cassette. Personally I think HP is flogging a dead horse, do we have examples of others using these libraries yet? Edited June 13, 2023 by Wrathchild 1 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted June 13, 2023 Share Posted June 13, 2023 1 hour ago, Wrathchild said: Isn't that typically app specific. I think you missed my "smiley" 1 hour ago, Wrathchild said: do we have examples of others using these libraries yet? As many have said before totally lacking documentation etc. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted June 13, 2023 Share Posted June 13, 2023 13 minutes ago, TGB1718 said: I think you missed my "smiley" let alone a question mark 😆 Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 13, 2023 Author Share Posted June 13, 2023 Well...I recently fixed the documentation problems with my text adventure codes, and I believe the documentation and header files are sufficient for AtaDiak65, AtaSimpleIO and MemXAtari. Wrathchild: you are kind of right: I am flogging a dead horse and am optimizing too early. I believe I have a reason to optimize some of my software, though: that it is designed for other users and that, in the end, I want people to be able to write more efficient code using my libraries. Quote Link to comment Share on other sites More sharing options...
danwinslow Posted June 13, 2023 Share Posted June 13, 2023 Nobody is using your stuff. That is your actual problem. You are providing something that no-one needs. All of your utilities help with things that aren't actually problems. Everything you handle is either already done in numerous ways, or trivial. In particular, no-one needs "cubbyhole" optimization software. AdvSkel is actually not a bad idea, but its executed and documented so badly that no one wants to use it. Stop obsessing about sizes, and take the time to build AdvSkel out into a real toolkit for people writing text adventures. Document it well. Then, even in this late day of 8bit, somebody somewhere might use it. 2 Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted June 13, 2023 Share Posted June 13, 2023 Exactly, you can write using Inform or even ScottFree type adventures and get them running on A8 and anything else with an interpreter with little to no coding skill 1 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted June 13, 2023 Share Posted June 13, 2023 (edited) Just for fun, I tried using some of the libraries of Mr Potter, Hmmmm.... took the libraries atasimplieio.lib and simpleio.lib from the downloaded zip file AtaDisk65-002.zip and had a conflict when I compiled a test program, it would appear that printc.o is included in both libraries ??? Also even with a simple test program, open a text file that does exist read 40 characters into a buffer I used printf to try print the input string as I couldn't use the atasimpleio library due to the conflict. then close the file really simple test nothing was printed to screen and on every occasion Altirra eventually crashed Bit of a mess really 😬 D:\ATR_NEW\cc65\lib>ar65 t atasimpleio.lib getkey.o getline.o goline.o home.o printc.o <<<<<<<<<<<<<<<<<<<<<<<<< here printi.o prints.o printscr.o revers2.o tab.o wrtitle.o printrs.o printrscr.o D:\ATR_NEW\cc65\lib>ar65 t ataricio.lib accessciov.o loadimg.o openfile.o closefile.o readfile.o writefile.o loadimg2.o crt0.o printc.o <<<<<<<<<<<<<<<<<<<<<<<<<<<<<here too saveimg2.o Edited June 13, 2023 by TGB1718 1 Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 13, 2023 Author Share Posted June 13, 2023 There should be a file in the distribution called "printc.s." Include it in the command line for the Atari-port batch files' cl65 command line before the libraries and come back to me with the results. I was having a bug with it, also, and had to supply it directly. The bug was that the start-up code wasn't writing properly to the module's code to define the address of the OS service for AtaSimpleIO's printc() function. I'm sorry. Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted June 13, 2023 Share Posted June 13, 2023 (edited) Sounds like one should try their stuff out on a clean machine to see if their stuff works and then document how to actually use. This is of course then to be tested on real hardware before distribution. rinse repeat, no new tale to tell... Edited June 13, 2023 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted June 13, 2023 Share Posted June 13, 2023 (edited) also really consider getting yourself on github and then issues can be tracked, people can view change history etc Edited June 13, 2023 by Wrathchild Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted June 14, 2023 Share Posted June 14, 2023 Did a bit of disassembling to try find out what's happening, have a look at this bit of code from the list file from cl65 in particular the JSR instruction highlighted, then look at the disassembler output at the same instruction This was compiled with printc.s on the cl65 compile and the file in the project directory 000000r 1 A0 0C ldy #$0C 000002r 1 20 rr rr jsr subysp 000005r 1 A0 0B ldy #$0B 000007r 1 B9 rr rr L0002: lda M0001,y 00000Ar 1 91 rr sta (sp),y 00000Cr 1 88 dey 00000Dr 1 10 F8 bpl L0002 00000Fr 1 ; 00000Fr 1 ; printc(instr); 00000Fr 1 ; 00000Fr 1 A5 rr lda sp 000011r 1 A6 rr ldx sp+1000013r 1 20 rr rr jsr _printc 000016r 1 ; 000016r 1 ; } 000016r 1 ; 000016r 1 A0 0C ldy #$0C 000018r 1 4C rr rr jmp addysp 206F JMP 0000 4C 00 00 <<<<<<<<<<<<<<<<<<<<<<< 2072 LDY #0C A0 0C ^ 2074 JSR 20D8 20 D8 20 ^ 2077 LDY #0B A0 0B ^ 2079 LDA 2108,Y B9 08 21 ^ 207C STA (82),Y 91 82 ^ 207E DEY 88 ^ 207F BPL 2079 10 F8 ^ 2081 LDA 82 A5 82 ^ 2083 LDX 83 A6 83 ^2085 JSR 206F 20 6F 20 DOES A JSR HERE i.e. to a JMP 0000 2088 LDY #0C A0 0C Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 14, 2023 Author Share Posted June 14, 2023 I just reinstalled and tried the latest published copy of AdvSkelVic65 and didn't see the bug. The cartridge-based Atari version crashed after the intro screen, though, but the screen did display. Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 14, 2023 Author Share Posted June 14, 2023 Maybe you have the wrong setup in your emulator: AdvSkelVic65's Atari ports require an Atari 800 emulation. BTW, the bug with the JSR $0000 instruction is fixed by a code snippet in the crt0.s file that writes the proper address to the instruction, as the JSR instruction calls the OS's print char function, and I need to write the proper address, and the address is different on different systems. Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted June 14, 2023 Share Posted June 14, 2023 Ok, putting crt0.s fixed the problem, but again it's down to documentation, you need to describe the build process. Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 14, 2023 Author Share Posted June 14, 2023 That's better. In the next version, I have to document it better. I thought I documented it better in the last release. Is there any specific issue you are having with the documentation? Did you read the comments in the code? Much of the build process is a fill-in-the-blank style. For example, if you want to add the ability to read a certain item, you add the code to read the item to the vRead() function by adding a condition to the switch() there, adding code to display the necessary text and ending the condition with a return;. I suggest putting the extra text in either WordsDB.c or WordsDB2.c and use printtok() to display the text, so that it can be stored in a system's extra RAM. Does rthis help? Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted June 14, 2023 Share Posted June 14, 2023 (edited) That's one of the problems!- 'in the next version I will document it better'. If you say all of this stuff in the threads why not copy paste the things to the documentation now? and for that matter, making people read endless threads to do the simple fixes blah blah shouldn't be the case... you should do the fixes immediately so people could build and use what you keep going on about. No one wants to have to put that much time into something that should be ready to use and ready to go. Edited June 14, 2023 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 14, 2023 Author Share Posted June 14, 2023 If there are any specific problems with the manual or the code comments, I'm all ears, as I'm currently updating AdvSkel65 now. AdvSkelVic65 is having a problem with 32k Atari cartridge support, and, while trying to fix it, I broke its 32k C64 cartridge support. Quote Link to comment Share on other sites More sharing options...
drac030 Posted June 15, 2023 Share Posted June 15, 2023 (edited) On 6/12/2023 at 8:24 PM, sanny said: clrscr() is part of the conio library which is optimized for speed. clrscr() optimized for speed. Like to make it execute once per frame, 50 times per second. At the expense of compatibility, portability and everything else. Yes, that makes perfect sense. Especially in a C library. Edited June 15, 2023 by drac030 2 Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted June 15, 2023 Author Share Posted June 15, 2023 Good news: AdvSkelVic65 is currently working properly on all supported systems. Now I need to work on the manual. Quote Link to comment Share on other sites More sharing options...
sanny Posted June 16, 2023 Share Posted June 16, 2023 On 6/15/2023 at 5:36 PM, drac030 said: clrscr() optimized for speed. Like to make it execute once per frame, 50 times per second. At the expense of compatibility, portability and everything else. Yes, that makes perfect sense. Especially in a C library. Don't know what this has to do with C itself. It's there to speed up screen output. You don't have to use it. https://cc65.github.io/doc/library.html#s5 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.