funkheld Posted November 7, 2020 Share Posted November 7, 2020 Hi good afternoon. the graphics for the atari can be called up in millfork-demo: asm void openmode (byte register (a) m) @ $ ef9c extern asm void drawto () @ $ f9c2 extern where can you find the two addresses for the openmode and the drawto? how can you call the fill and plot in millfork? Quote Link to comment Share on other sites More sharing options...
ivop Posted November 7, 2020 Share Posted November 7, 2020 You should not jump straight into the OS. Use CIO. That's what it's for. Only 128 or 256-byte coding challenges is something different. There you specify excactly which hardware and OS it will run on. And now, how many times have people asked you to stop spamming this forum with constantly creating new threads? 1 Quote Link to comment Share on other sites More sharing options...
funkheld Posted November 7, 2020 Author Share Posted November 7, 2020 hello, thanks for info. greeting Quote Link to comment Share on other sites More sharing options...
xxl Posted November 7, 2020 Share Posted November 7, 2020 1 hour ago, funkheld said: how can you call the fill and plot in millfork? plot: $f1d8 (color to $2FB) fill: same as drawto but first set fillfla: 1 to $2B7 and color to $2FD Quote Link to comment Share on other sites More sharing options...
ivop Posted November 7, 2020 Share Posted November 7, 2020 51 minutes ago, xxl said: plot: $f1d8 (color to $2FB) fill: same as drawto but first set fillfla: 1 to $2B7 and color to $2FD For which OS? Those entry points aren't even listed in Mapping The Atari, even though it lists a lot of entry points that are not portable. Quote Link to comment Share on other sites More sharing options...
xxl Posted November 7, 2020 Share Posted November 7, 2020 (edited) 4 minutes ago, ivop said: For which OS? Those entry points aren't even listed in Mapping The Atari, even though it lists a lot of entry points that are not portable. for all XL series --- for each system that was distributed with Atari XL / XE / XEGS series Edited November 7, 2020 by xxl Quote Link to comment Share on other sites More sharing options...
funkheld Posted November 7, 2020 Author Share Posted November 7, 2020 (edited) hello xxl , thanks. your proposal works wonderfully. Thank you. with : include from millfork: -------------------------------------- alias prev_x = os_OLDCOL.lo alias cursor_x = os_COLCRS.lo alias prev_y = os_OLDROW alias cursor_y = os_ROWCRS alias color = os_ATACHR alias colfill = os_FILDAT alias fillfla = os_FILFLG ------------------------------------- simple fill with millfork : alias prev_x = os_OLDCOL.lo alias cursor_x = os_COLCRS.lo alias prev_y = os_OLDROW alias cursor_y = os_ROWCRS alias color = os_ATACHR byte colplot @ $2fb byte colfill @ $2fd byte fillfla @ $2b7 asm void openmode(byte register(a) m) @ $ef9c extern asm void drawto() @ $f9c2 extern asm void plot() @ $f1d8 extern void main(){ openmode(7) colplot=5 cursor_x = 10 cursor_y = 10 prev_x = 50 prev_y = 10 drawto() cursor_x = 10 cursor_y = 10 prev_x = 10 prev_y = 50 drawto() cursor_x = 50 cursor_y = 10 prev_x = 50 prev_y = 50 drawto() fillfla =1 colfill=6 cursor_x = 10 cursor_y = 10 prev_x = 10 prev_y = 50 drawto() while true {} } Edited November 8, 2020 by funkheld Quote Link to comment Share on other sites More sharing options...
xxl Posted November 7, 2020 Share Posted November 7, 2020 (edited) $2FB = ATACHR $2FD = FILDAT $2B7 = FILFLG ---- LOCATE: GETPLT equ $F18F Edited November 7, 2020 by xxl Quote Link to comment Share on other sites More sharing options...
+JAC! Posted November 7, 2020 Share Posted November 7, 2020 I'm with IVOP here. Using XIO commands via the CIOV vector the the correct and documented way. Code like the above is not portable and will break on arbitrary OS versions. There are much many then "each system that was distributed with Atari XL / XE / XEGS series" even though people tend forget that. http://www.abbuc.de/software/133-software/softwarereferenz/315-xio-command-codes 17 DRAW LINE 18 FILL 2 Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted November 7, 2020 Share Posted November 7, 2020 2 hours ago, ivop said: Those entry points aren't even listed in Mapping The Atari, even though it lists a lot of entry points that are not portable. Because it's a really terrible idea to use them. 1 Quote Link to comment Share on other sites More sharing options...
xxl Posted November 7, 2020 Share Posted November 7, 2020 15 minutes ago, funkheld said: your proposal works wonderfully. sometimes there is a need to get the memory address at a specific point on the screen. write the coordinates to "rowcrs" and "colcrs" do: CONVRT = $ F5AC and under ADRESS = $ 64, $ 65 you will have a byte address in the screen memory ? Quote Link to comment Share on other sites More sharing options...
funkheld Posted November 7, 2020 Author Share Posted November 7, 2020 hello thanks xxl. greeting Quote Link to comment Share on other sites More sharing options...
funkheld Posted November 7, 2020 Author Share Posted November 7, 2020 (edited) Quote I'm with IVOP here. Using XIO commands via the CIOV vector the the correct and documented way. Code like the above is not portable and will break on arbitrary OS versions. There are much many then "each system that was distributed with Atari XL / XE / XEGS series" even though people tend forget that. it would be nice if there was a suggestion for millfork on how to implement your idea for the graphic "open, plot, drawto, fill" with XIO? I'm a beginner and have asked about it several times, but was laughed at here because I can't. Thank you. greeting Edited November 7, 2020 by funkheld Quote Link to comment Share on other sites More sharing options...
funkheld Posted November 8, 2020 Author Share Posted November 8, 2020 hello xxl. is there such a thing that you suggested (and works great) also for save and load? Thank you. greeting Quote Link to comment Share on other sites More sharing options...
xxl Posted November 8, 2020 Share Posted November 8, 2020 (edited) there are only "disk sector" read/write procedures in the OS, no "file" read/write procedures. If you are creating a BOOT program, the OS routines are fine (many era games written on disk are just like that), but if you need to read/write to/from a file you have two options: load DOS before running your program or use xBIOS. DOS (located in BOOT SECTORS, installs "D:" device in the system) - 384 bytes DOS - access to files through the CIO mechanism. https://xxl.atari.pl/xbootdos/ xBIOS (1 KB relocated library) https://xxl.atari.pl/ - access files in a compact way: fname .byte c'MYFILE COM' ldy < fname ldx > fname jsr xBIOS_LOAD_FILE there are also other DOSes: the AtariDOS family, the SpartaDOS family, DOS 3, DOS 4, DOS XE and many others before choosing the appropriate one, get to know the differences in the file system because quite a few are not compatible with each other (in absolutely basic functions they are compatible). back to the answer: you need to know exactly what you need. Edited November 8, 2020 by xxl Quote Link to comment Share on other sites More sharing options...
funkheld Posted November 8, 2020 Author Share Posted November 8, 2020 Hello, thanks for the help. I take the normal dos 2.05 and want to do it via the xbios. Thank you. greeting Quote Link to comment Share on other sites More sharing options...
xxl Posted November 9, 2020 Share Posted November 9, 2020 Try these two functions first. If you are a beginner then do not use the xBIOS configuration file. fname .byte c'MYFILE COM' ; 11 ATASCII chars ldy < fname ldx > fname jsr xBIOS_OPEN_FILE ldy < dest ldx > dest jsr xBIOS_LOAD_DATA Quote Link to comment Share on other sites More sharing options...
zbyti Posted November 9, 2020 Share Posted November 9, 2020 XXL - a man who always tries the impossible, will he succeed this time? Stay tuned... 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.