Jump to content

funkheld

Members
  • Posts

    641
  • Joined

  • Last visited

Everything posted by funkheld

  1. Hi, Thank You. it works wonderfully to push the data into the array. greeting
  2. Hi, Thank You. I just want to load a bin file into an array from atarixl here. this is TEST.BIN (3840 byte) array is : char data[] export char DATA [] ....... without converting a file in any way. greeting
  3. hello, load data (bin) to atarixl. how can you change that below please: export char DATEN[]..... --------------------------------------- export char SPRITE[] = kickasm(resource "sprite.png") {{ .var pic = LoadPicture("sprite.png", List().add($000000, $ffffff)) .for (var y=0; y<21; y++) .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }}; ------------------------------------- greeting
  4. hello tanks all for help and info. greeting
  5. I never got the (atarixl.cfg) right. there were always some errors with memory allocations. this kickc is ok. greeting
  6. hello, good day. this linking is for the c64. how does the linking look for the atarixl? Thank you. greeting
  7. this kickc is a magic work. move this pm with the keys: q / w / e / s is only 302 bytes small as xex. Great.... greeting #pragma target(atarixl) #pragma zp_reserve(0x00..0x7f) #include <atari-xl.h> #include <printf.h> #include <conio.h> char * const ramto = 0x6a; char * const colorpm0 = 704; char * const colorpm1 = 705; char * const colorpm2 = 706; char * const colorpm3 = 707; word i, pmgmem, zahl; char j, px0 , py0, y1, z; const char pmdata[] = { 0,255,129,129,129,129,129,129,255,0}; void main() { *SDMCTL = 46; *SDLST = DISPLAY_LIST; px0 = 100; py0 = 70; j = *ramto-8; ANTIC->PMBASE = j; pmgmem = j * 256; GTIA->GRACTL = 3; GTIA->SIZEP0 = 0; *colorpm0 = 183; GTIA->HPOSP0 = px0 ; schiebe(); while (1) { *CH = 0xff; while(*CH == 0xff) ; char keyPressed = *CH; z=keyPressed ; if(z==$2f) { px0 =px0-1; schiebe(); }; if(z==$2a) { px0 =px0+1; schiebe(); }; if(z==$2e) { py0 =py0-1; schiebe(); }; if(z==$3e) { py0 =py0+1; schiebe(); }; } } void waitkey() { while(!kbhit()) ; clrkb(); } char TEXT[] = " hello atari 8bit " " Demonstrates ANTIC display list " " HELLO atari 8BIT " ; char DISPLAY_LIST[] = { BLANK8, BLANK8, BLANK8, LMS|MODE7, <TEXT, >TEXT, BLANK8,BLANK8, MODE2, BLANK8,BLANK8, MODE7, JVB, <DISPLAY_LIST, >DISPLAY_LIST }; void schiebe(){ char *pmadr = pmgmem + 512 + py0; for(y1=0;y1<10;y1++) { pmadr[y1] = pmdata[y1]; } GTIA->HPOSP0 = px0 ; }
  8. then slide that over into the right window. Thank you. greeting
  9. Hi good afternoon. i have different resolutions in kickc: mode 7, mode 2 and pm. the text doesn't look neat, what kind of mistake is that? Thank you. greeting #pragma target(atarixl) #pragma encoding(atascii) #pragma zp_reserve(0x00..0x7f) #include <atari-xl.h> #include <printf.h> #include <conio.h> char * const ramto = 0x6a; char * const colorpm0 = 704; char * const colorpm1 = 705; char * const colorpm2 = 706; char * const colorpm3 = 707; const char pmdata[] = { 255,129,129,129,129,129,129,255}; void main() { word i, pmgmem, zahl; char j, px0 , py0; *SDMCTL = 0x21; *SDLST = DISPLAY_LIST; px0 = 100; py0 = 70; GTIA->GRACTL = 0; j = *ramto-8; ANTIC->PMBASE = j; pmgmem = j * 256; *SDMCTL = 46; GTIA->GRACTL = 3; GTIA->SIZEP0 = 0; *colorpm0 = 183; GTIA->HPOSP0 = px0 ; char *pmadr = pmgmem + 512 + py0; pmadr[0] = pmdata[0]; pmadr[1] = pmdata[1]; pmadr[2] = pmdata[2]; pmadr[3] = pmdata[3]; pmadr[4] = pmdata[4]; pmadr[5] = pmdata[5]; pmadr[6] = pmdata[6]; pmadr[7] = pmdata[7]; waitkey(); } void waitkey() { while(!kbhit()) ; clrkb(); } char TEXT[] = "hello atari 8bit" "Demonstrates ANTIC display list " "HELLO atari 8BIT" ; char DISPLAY_LIST[] = { BLANK8, BLANK8, BLANK8, LMS|MODE7, <TEXT, >TEXT, BLANK8,BLANK8, MODE2, BLANK8,BLANK8, MODE7, JVB, <DISPLAY_LIST, >DISPLAY_LIST };
  10. sometimes addresses from the system are constant and sometimes not, why? ------------------------------ char * const FILDAT = 0x2FD; char * ROWCRS = 0x54; word * COLCRS = 0x55; char * const ATACHR = 0x2FB; char * const CH = 0x2FC; void * CIOV = 0xE456; ----------------------------- greeting.
  11. what effect does the "const" have? ------------------------------------ char * const ATACHR = 0x2FB; char * ATACHR = 0x2FB; ------------------------------------ greeting
  12. I program my vic20 with this forth. There are also specialists there who can help you, not just for the vic20 greeting http://sleepingelephant.com/ipw-web/bulletin/bb/viewtopic.php?f=2&t=7557
  13. have now tried the pm in kickc in graphics mode 7. you can move the pm with the q / w / e / s keys. the program xex is only 368 byte big in kickc. greeting #pragma target(atarixl) #pragma encoding(atascii) #pragma zp_reserve(0x00..0x7f) #include <atari-xl.h> #include <printf.h> #include <conio.h> #define ICCOM_OPEN_CHANNEL 0x03; #define ICCOM_PUT_BINARY_RECORD 0x0B; #define ICCOM_CLOSE 0x0C; #define ICCOM_DRAW_LINE 0x11; void * CIOV = 0xE456; struct ATARI_IOCB { char ICHID; char ICDNO; char ICCOM; char ICSTA; char* ICBA; char* ICPT; word ICBL; char ICAX1; char ICAX2; char ICAX3; char ICAX4; char ICAX5; char ICAX6; }; struct ATARI_IOCB * const IOCB0 = 0x340; struct ATARI_IOCB * const IOCB6 = 0x3A0; char *sDrive = "S:"; char * const ATACHR = 0x2FB; word i, pmgmem; char j, px0 , py0; char * ramto = 0x6a; char * colorpm0 = 704; char * colorpm1 = 705; char * colorpm2 = 706; char * colorpm3 = 707; char y,y1; const char pmdata[] = { 0,255,129,129,129,129,129,129,255,0}; void main() { graphics(7); color(1); for(y=0;y<10;y++) { y1=y1+10; plot(0, 0); drawTo(159,y1); } px0 = 100; py0 = 60; GTIA->GRACTL = 0; j = *ramto-24; ANTIC->PMBASE = j; pmgmem = j * 256; *SDMCTL = 46; GTIA->GRACTL = 3; GTIA->SIZEP0 = 0; *colorpm0 = 202; schiebe(); while (1) { *CH = 0xff; while(*CH == 0xff) ; char keyPressed = *CH; switch(keyPressed) { case $2f: { px0 =px0-1; schiebe(); }; break; case $2a: { px0 =px0+1; schiebe(); }; break; case $2e: { py0 =py0-1; schiebe(); }; break; case $3e: { py0 =py0+1; schiebe(); }; break; default: ; break; } } } void schiebe(){ char *pmadr = pmgmem + 512 + py0; for(y1=0;y1<10;y1++) { pmadr[y1] = pmdata[y1]; } GTIA->HPOSP0 = px0 ; } void closeChannel() { IOCB6->ICCOM = ICCOM_CLOSE; asm(clobbers "AXY") { ldx #$60 jmp CIOV }; } void graphics(char mode) { closeChannel(); IOCB6->ICCOM = ICCOM_OPEN_CHANNEL; IOCB6->ICAX1 = 0x0C; IOCB6->ICAX2 = mode; IOCB6->ICBA = sDrive; asm(clobbers "AXY") { ldx #$60 jmp CIOV }; } void position(word x, char y) { *COLCRS = x; *ROWCRS = y; } void plot(word x, char y) { position(x, y); IOCB6->ICCOM = ICCOM_PUT_BINARY_RECORD; IOCB6->ICBL = 0; asm(clobbers "AXY") { ldx #$60 lda ATACHR jmp CIOV }; } void drawTo(word x, char y) { position(x, y); IOCB6->ICCOM = ICCOM_DRAW_LINE; IOCB6->ICAX1 = 0x0C; IOCB6->ICAX2 = 0; asm(clobbers "AXY") { ldx #$60 jmp CIOV }; } void color(char c) { *ATACHR = c; } void waitkey() { while(!kbhit()) ; clrkb(); }
  14. Hello, thanks for the help. I didn't know the table for CH. greeting
  15. Hi good afternoon. where please can I find the character set for the "case" from kickc? Kickc-case: "A" = 63 "..." B "= 21? Thank you. greeting #pragma encoding(atascii) #pragma zp_reserve(0x00..0x7f) #include <string.h> #include <stdlib.h> char * const CH = 0x2FC; void * CIOV = 0xE456; struct ATARI_IOCB { char ICHID; char ICDNO; char ICCOM; char ICSTA; char* ICBA; char* ICPT; char* ICBL; char ICAX1; char ICAX2; char ICAX3; char ICAX4; char ICAX5; char ICAX6; }; struct ATARI_IOCB * const IOCB0 = 0x340; void main() { while (1) { *CH = 0xff; while(*CH == 0xff) ; char keyPressed = *CH; switch(keyPressed) { case 63: print("pebi-63\n"); break; case 21: print("pebi-21\n"); break; default: print("nix\n"); break; } } } void printc(char c) { char buffer[20]; memset(buffer, 0, 20); utoa(c, buffer, HEXADECIMAL); print(buffer); } void cputln() { print("\n"); } void print(char* message) { char *p = message; while (*p != 0) { if (*p == '\n') *p = 0x9b; p++; } IOCB0->ICCOM = 0x0b; IOCB0->ICBA = message; IOCB0->ICBL = strlen(message); asm { ldx #0 jmp CIOV } }
  16. Hi, Thank You. it's nice that it is being developed so quickly. greeting
  17. Hello, thanks for the help. I take the normal dos 2.05 and want to do it via the xbios. Thank you. greeting
  18. hello xxl. is there such a thing that you suggested (and works great) also for save and load? Thank you. greeting
  19. 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
  20. 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 {} }
  21. 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?
×
×
  • Create New...