Jump to content

funkheld

Members
  • Posts

    641
  • Joined

  • Last visited

Everything posted by funkheld

  1. Yes, thank you. for me this is a problem with kickc's similarity to c. I'm trying to implement cc65 programs. and that doesn't work. happens here with the pm. greeting
  2. Hi good afternoon. kickc sometimes has a different spelling of c and is not comparable to the cc65-c. I am concerned with the implementation in the typical kickc notation. I have implemented the pm in millfork in actin! and in pascal. but i can't find a typical solution in kickc. I sometimes have the impression of kickc that it distributes the code in different memory spaces that interfere with each other. I started the pm. when I use the graphic screen, one sometimes has to go to "ramtop = os_RAMTOP - 24" for certain pm types. that bothers kickc. it would be good if you could find a graphic memory allocation for ale drawing from kickc like in mad-pascal, action! or cc65. the kickc include also have a different effect on the program style, unlike cc65. greeting
  3. thanks for the information. I have now found that kickc is not yet able to pm. kickc is still not so clear about the atari system because of incomplete includes millfork is ok with pm : // q=$51 e=$45 w=$57 s=$53 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 asm void openmode(byte register(a) m) @ $ef9c extern asm void drawto() @ $f9c2 extern array pm0 = [ 0,0,0,0,255, 129, 129, 129, 129,255,0,0,0,0] void copy_block(pointer src, pointer dsc, word size){ word i for i,0,to,size-1{ dsc[i] = src[i] } } noinline asm byte readkey() { lda #$c sta $2A lda $E425 pha lda $E424 pha rts } void main() { pointer scr byte ramtop, yp0 , xp0 , d , testxy word yadr, pmadr byte i openmode(7) color=14 for i,0,to,24 { cursor_x = 0 cursor_y = 0 prev_x = 159 prev_y = i * 4 drawto() } ramtop = os_RAMTOP - 24 antic_pmbase = ramtop os_SDMCTL = 46 pmadr = ramtop * $100 gtia_gractl = 3 gtia_colpm0=183 gtia_sizep0=0 yp0=58 xp0=100 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,12) gtia_hposp0=xp0 while true { d = readkey() if d == $45 { testxy = 1 xp0=xp0+1 yadr = pmadr yadr = yadr + 512 + yp0 gtia_hposp0=xp0 } else if d == $51 { testxy = 2 xp0=xp0-1 yadr = pmadr yadr = yadr + 512 + yp0 gtia_hposp0=xp0 } else if d == $57 { testxy =3 yp0=yp0-1 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,14) gtia_hposp0=xp0 } else if d == $53 { testxy = 4 yp0=yp0+1 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,14) gtia_hposp0=xp0 } if gtia_p0pf > 0 { if testxy == 1 { xp0=xp0-4 yadr = pmadr yadr = yadr + 512 + yp0 gtia_hposp0=xp0 } else if testxy == 2 { xp0=xp0+4 yadr = pmadr yadr = yadr + 512 + yp0 gtia_hposp0=xp0 } else if testxy == 3 { yp0=yp0+4 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,14) gtia_hposp0=xp0 } else if testxy == 4 { yp0=yp0-4 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,14) gtia_hposp0=xp0 } testxy=0 gtia_hitclr=1 } } } greeting
  4. it's not about games for me, but that kickc and millfork should clarify a few things to me.
  5. Hi good afternoon. how can you create with kickc pm and move with the key please? thanks greeting
  6. all programming languages for a correct system are bad. if there was a good programming language for it, no more bad programming languages would be invented. greeting
  7. hmmm....... looks like the election result of trump ...
  8. Hi good afternoon. I found an atari-io.c with atari-iocb.h and atari-mem.h the atari-io.c does not work. does something have to be put in the atari-xl.h? Thank you. greeting src-atari-io.zip
  9. hello tebe, do you also play with the kickc? i have millfork and kickc to play with. somehow tend to kickc. it would be nice if there were more demos in kickc for the atari to learn more. I don't know how the include atari-gtia.h "works with the command? there is in the atari-gtia.h "char COLPF0;" I can do this in my program with "GTIA-> COLPF0 = 0x28;" call. how do these two commands play together? greeting
  10. that's good to hear. then millfork and kickc continue with your support in development. Thank you. greeting
  11. error in the screen. the screen is pushed too far up during execution. 80% of the race is only used.
  12. player with collision (mulbi.bin) could be even faster. where can you please do something? greeting at one point the player does not come through. which place? key : Q/W/E/S that's what i picked out for readkey. import studio and import keyboard can then be removed. -------------------------------------- noinline asm byte readkey() { lda #$C sta $2A lda $E425 pha lda $E424 pha rts } ------------------------------------ // q=$51 e=$45 w=$57 s=$53 import stdio import keyboard word pmadr @ $2D5 byte pcol0 @ $2C0 byte hposp0 @ $D000 byte sizep0 @ $d008 byte p0pf @ $D004 byte hitclr @ $D01E asm void openmode(byte register(a) m) @ $ef9c extern array pm0 = [ 0,0,0,0,255, 129, 129, 129, 129,255,0,0,0,0] array d1 = file("data/mulbi.bin") void copy_block(pointer src, pointer dsc, word size){ word i for i,0,to,size-1{ dsc[i] = src[i] } } void main() { pointer scr byte ramtop, yp0 , xp0 , c , testxy word yadr , i ensure_mixedcase() openmode(7) scr = os_SAVMSC for i,0,to,3839 { scr[i] = d1[i] } ramtop = os_RAMTOP - 24 antic_pmbase = ramtop os_SDMCTL = 46 pmadr = ramtop * $100 gtia_gractl = 3 pcol0=183 sizep0=0 yp0=58 xp0=100 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,12) hposp0=xp0 while true { c = readkey() if c == $45 { testxy = 1 xp0=xp0+1 yadr = pmadr yadr = yadr + 512 + yp0 hposp0=xp0 } else if c == $51 { testxy = 2 xp0=xp0-1 yadr = pmadr yadr = yadr + 512 + yp0 hposp0=xp0 } else if c == $57 { testxy =3 yp0=yp0-1 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,14) hposp0=xp0 } else if c == $53 { testxy = 4 yp0=yp0+1 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,14) hposp0=xp0 } if p0pf > 0 { if testxy == 1 { xp0=xp0-4 yadr = pmadr yadr = yadr + 512 + yp0 hposp0=xp0 } else if testxy == 2 { xp0=xp0+4 yadr = pmadr yadr = yadr + 512 + yp0 hposp0=xp0 } else if testxy == 3 { yp0=yp0+4 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,14) hposp0=xp0 } else if testxy == 4 { yp0=yp0-4 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,14) hposp0=xp0 } testxy=0 hitclr=1 } } }
  13. player and graphics yourself with drawto () // q=$51 e=$45 w=$57 s=$53 import stdio import keyboard word pmadr @ $2D5 byte pcol0 @ $2C0 byte hposp0 @ $D000 byte sizep0 @ $d008 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 asm void openmode(byte register(a) m) @ $ef9c extern asm void drawto() @ $f9c2 extern array pm0 = [ 0,255, 129, 129, 129, 129, 129, 129 ,255,0] void copy_block(pointer src, pointer dsc, word size){ word i for i,0,to,size-1{ dsc[i] = src[i] } } void main() { pointer scr byte ramtop, yp0 , xp0 , c word yadr byte i ensure_mixedcase() openmode(7) color=14 for i,0,to,24 { cursor_x = 0 cursor_y = 0 prev_x = 159 prev_y = i * 4 drawto() } ramtop = os_RAMTOP - 24 antic_pmbase = ramtop os_SDMCTL = 46 pmadr = ramtop * $100 gtia_gractl = 3 pcol0=183 sizep0=0 yp0=60 xp0=100 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,10) hposp0=xp0 while true { c = readkey() if c == $45 { xp0=xp0+1 yadr = pmadr yadr = yadr + 512 + yp0 hposp0=xp0 } else if c == $51 { xp0=xp0-1 yadr = pmadr yadr = yadr + 512 + yp0 hposp0=xp0 } else if c == $57 { yp0=yp0-1 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,10) hposp0=xp0 } else if c == $53 { yp0=yp0+1 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,10) hposp0=xp0 } } }
  14. movement of the player in the graphic mulbi.bin // q=$51 e=$45 w=$57 s=$53 import stdio import keyboard word pmadr @ $2D5 byte pcol0 @ $2C0 byte hposp0 @ $D000 byte sizep0 @ $d008 asm void openmode(byte register(a) m) @ $ef9c extern array pm0 = [ 0,255, 129, 129, 129, 129, 129, 129 ,255,0] array d1 = file("data/mulbi.bin") void copy_block(pointer src, pointer dsc, word size){ word i for i,0,to,size-1{ dsc[i] = src[i] } } void main() { pointer scr byte ramtop, yp0 , xp0 , c word yadr , i ensure_mixedcase() openmode(7) scr = os_SAVMSC for i,0,to,3839 { scr[i] = d1[i] } ramtop = os_RAMTOP - 24 antic_pmbase = ramtop os_SDMCTL = 46 pmadr = ramtop * $100 gtia_gractl = 3 pcol0=183 sizep0=0 yp0=60 xp0=100 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,10) hposp0=xp0 while true { c = readkey() if c == $45 { xp0=xp0+1 yadr = pmadr yadr = yadr + 512 + yp0 hposp0=xp0 } else if c == $51 { xp0=xp0-1 yadr = pmadr yadr = yadr + 512 + yp0 hposp0=xp0 } else if c == $57 { yp0=yp0-1 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,10) hposp0=xp0 } else if c == $53 { yp0=yp0+1 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,10) hposp0=xp0 } } }
  15. Hi good afternoon. how can you speed up this player. I can control it with the Q / W / E / S buttons. the ifs are probably not ideal. how can you please do as a function? I took out the copy_block for the x-shift. Thank you. greeting // q=$51 e=$45 w=$57 s=$53 import stdio import keyboard word pmadr @ $2D5 byte pcol0 @ $2C0 byte hposp0 @ $D000 byte sizep0 @ $d008 asm void openmode(byte register(a) m) @ $ef9c extern array pm0 = [ 0,255, 129, 129, 129, 129, 129, 129 ,255,0] void copy_block(pointer src, pointer dsc, word size){ word i for i,0,to,size-1{ dsc[i] = src[i] } } void main() { byte ramtop, yp0 , xp0 word yadr byte c ensure_mixedcase() openmode(0) ramtop = os_RAMTOP - 8 antic_pmbase = ramtop os_SDMCTL = 46 pmadr = ramtop * $100 gtia_gractl = 3 pcol0=183 sizep0=1 yp0=60 xp0=100 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,10) hposp0=xp0 while true { c = readkey() if c == $45 { xp0=xp0+1 yadr = pmadr yadr = yadr + 512 + yp0 hposp0=xp0 } if c == $51 { xp0=xp0-1 yadr = pmadr yadr = yadr + 512 + yp0 hposp0=xp0 } if c == $57 { yp0=yp0-1 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,10) hposp0=xp0 } if c == $53 { yp0=yp0+1 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,10) hposp0=xp0 } } }
  16. hello, this millfork is easy to program when dealing with the a8 include. you have to remember a lot of things with the meaning of the include. if you know them, the millfork is a good thing. but i don't always recognize the meaning (see graphic with millfork) my graphic example still doesn't work. for this I created a player0 as a beginner with fixed values in mode 0. I will expand it with function calls. if you play in graphics mode 7, for example, you have to set the ramtop lower depending on the pm mode. in the mulbi.zip is the mulbi.bin , 3840 byte greeting grafikmodus 0 word pmadr @ $2D5 byte pcol0 @ $2C0 byte hposp0 @ $D000 byte sizep0 @ $d008 asm void openmode(byte register(a) m) @ $ef9c extern array pm0 = [ 255, 129, 129, 129, 129, 129, 255] void copy_block(pointer src, pointer dsc, word size){ word i for i,0,to,size-1{ dsc[i] = src[i] } } void main() { byte ramtop, yp0 word yadr openmode(0) ramtop = os_RAMTOP - 8 antic_pmbase = ramtop os_SDMCTL = 46 pmadr = ramtop * $100 gtia_gractl = 3 pcol0=183 sizep0=1 yp0=60 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,7) hposp0=100 while true {} } grafikmodus 7 word pmadr @ $2D5 byte pcol0 @ $2C0 byte hposp0 @ $D000 byte sizep0 @ $d008 asm void openmode(byte register(a) m) @ $ef9c extern array pm0 = [ 255, 129, 129, 129, 129, 129, 255] array d1 = file("data/mulbi.bin") void copy_block(pointer src, pointer dsc, word size){ word i for i,0,to,size-1{ dsc[i] = src[i] } } void main() { pointer scr byte ramtop, yp0 word yadr,i openmode(7) scr = os_SAVMSC for i,0,to,3839 { scr[i] = d1[i] } ramtop = os_RAMTOP - 24 antic_pmbase = ramtop os_SDMCTL = 46 pmadr = ramtop * $100 gtia_gractl = 3 pcol0=183 sizep0=1 yp0=60 yadr = pmadr yadr = yadr + 512 + yp0 copy_block(pm0,yadr,7) hposp0=100 while true {} } mulbi.zip
  17. I have often seen here that you were not familiar with the program and did not know the commands and suggested another compiler / program that you knew well. but that was not my intention to change the programming language. I am not asking here which program I would like to take. I assume that nobody can do this for Millfork. every foreigner has weak points like us Germans. But we Germans are better at fighting corona, or you would like to make a promise. you had more deaths in the corona than we did and now you're starting off again. so don't be so proud.
  18. thanks for info. I don't get warm with pascal. I've now tried to do the graphics in millfork. there is an error message with os_iccom. how should the iccom be addressed? greeting void closeChannel() { os_ICCOM = os_CLOSE asm{ ldx #$60 jmp os_CIOV } } void graphics(byte mode) { closeChannel() os_ICCOM = os_Open os_ICAX1 = $0c os_ICAX2 = mode os_ICBAL = "S" os_ICBAH = ":" asm{ ldx #$60 jmp os_CIOV } } void plot() { os_COLCRS.lo = 20 os_COLCRS.hi = 0 os_ROWCRS = 20 os_ICCOM = os_PUTCHR os_ICBLL = 0 os_ICBLH = 0 asm{ ldx #$60 lda os_ATACHR jmp os_CIOV } } void color(byte c) { os_ATACHR = c } void drawTo() { pos_COLCRS.lo = 40 os_COLCRS.hi = 0 os_ROWCRS = 40 os_ICCOM = os_DRAWLN os_ICAX1 = $0C os_ICAX2 = 0 asm{ ldx #$60 jmp os_CIOV } } void main(){ graphics(16+7) color(14) plot() drawto() while true {} }
  19. hello, this graphic below works now. can you please show me how plot and fill works in millfork? Thank you. greeting 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 asm void openmode(byte register(a) m) @ $ef9c extern asm void drawto() @ $f9c2 extern byte i void main(){ openmode(7) color=14 for i,0,to,95 { cursor_x = 0 cursor_y = 0 prev_x = 159 prev_y = i drawto() } while true {} }
  20. hello thanks. I wanted to draw a line, please. how does it work in millfork for the atari? is the mode in basic or in antic? how is the color set? Thank you greeting 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 asm void openmode(byte register(a) m) @ $ef9c extern asm void drawto() @ $f9c2 extern void main(){ openmode($a) color=2 cursor_x = 1 cursor_y = 1 prev_x = 30 prev_y = 30 drawto() while true {} }
  21. const array(byte) dl align(16) will a free address be given here for 16 byte , please? byte RTCLOK @ 0 byte iter0B @ 1 word iter0W @ 2 bool run_counter @ 4 is this addr : 0,1,2,4 from system? greeting
  22. how does it go on with millfork (atarixl)? does the fine-tuning now follow inside for the consumer / user or was it that during development? i can't find any further reports on the future of millfork. i know other developments where we consumers are shown what new things will come in in the future. It would be a shame if the development is now stopped according to the motto "that was it". greeting
  23. hello thanks. why is the : atariscr where can i find it? const array text align(64) = "...MILLFORK RULEZ..." atariscr certain things are alien to me. const array player @ ADDRPLA = file("data/mpt_player.obj", 6) is the load-command. is there something to save, please. greeting
×
×
  • Create New...