funkheld
Members-
Posts
641 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Gallery
Events
Store
Everything posted by funkheld
-
Hi, Thank You. it works wonderfully to push the data into the array. greeting
-
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
-
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
-
hello tanks all for help and info. greeting
-
I never got the (atarixl.cfg) right. there were always some errors with memory allocations. this kickc is ok. greeting
-
hello, good day. this linking is for the c64. how does the linking look for the atarixl? Thank you. greeting
-
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 ; }
-
hello, thanks for all friends.
-
kickc : mode 7, mode 2 , pm : text no .
funkheld replied to funkheld's topic in Atari 5200 / 8-bit Programming
then slide that over into the right window. Thank you. greeting -
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 };
-
hello thanks. greeting
-
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.
-
what effect does the "const" have? ------------------------------------ char * const ATACHR = 0x2FB; char * ATACHR = 0x2FB; ------------------------------------ greeting
-
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
-
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(); }
-
Kickc-case: "A" = 63 "" B "= 21?
funkheld replied to funkheld's topic in Atari 5200 / 8-bit Programming
Hello, thanks for the help. I didn't know the table for CH. greeting -
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 } }
-
Hi, Thank You. it's nice that it is being developed so quickly. greeting
-
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 {} }