Jump to content
IGNORED

cc65/AtaSimpleIO cursor?


Recommended Posts

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 by TGB1718
Link to comment
Share on other sites

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 :)

 

Link to comment
Share on other sites

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 by Wrathchild
  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.  

Link to comment
Share on other sites

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.

  • Like 2
Link to comment
Share on other sites

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 by TGB1718
  • Haha 1
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by _The Doctor__
Link to comment
Share on other sites

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+1
000013r 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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 by _The Doctor__
Link to comment
Share on other sites

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 by drac030
  • Like 2
Link to comment
Share on other sites

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

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