Hi good afternoon.
I would like to please set a value in video with prog8 and vpoke.
it doesn't work.
what's wrong?
ps : sys.set_rasterline(150) is ok.
Thanks.
greeting
---------------------------------
%import gfx2
%import syslib
main {
uword address
ubyte wert
ubyte bank
sub start() {
gfx2.screen_mode(1)
address=100
bank=0
wert=255
sys.vpoke(bank,address,wert) >>>>>>>>>>>>>>> is error
repeat {
}
}
}
---------------------------------------
prog8 : vpoke not function with %import syslib
prog8 : vpoke not function with %import syslib
- Attachments
-
- vpoke.jpg (49.17 KiB) Viewed 1457 times
- desertfish
- Posts: 1123
- Joined: Tue Aug 25, 2020 8:27 pm
- Location: Netherlands
Re: prog8 : vpoke not function with %import syslib
vpoke (and many , many other symbols related to the Commander X16) can be found in the "cx16" namespace instead.
cx16.vpoke(1, $fa02, $0)
it shares the same module source file with sys and cbm namespaces. Note that the module file name is only used in the %import directive, after that, it is no longer visible - only the block names remain (sys, cbm, cx16 ...)
https://github.com/irmen/prog8/blob/mas ... ib.p8#L756
cx16.vpoke(1, $fa02, $0)
it shares the same module source file with sys and cbm namespaces. Note that the module file name is only used in the %import directive, after that, it is no longer visible - only the block names remain (sys, cbm, cx16 ...)
https://github.com/irmen/prog8/blob/mas ... ib.p8#L756
Re: prog8 : vpoke not function with %import syslib
Thanks for the info.
How can you make data visible on which screen with the vpoke? I would then like, for example, Send data from bank 45 to the video ram.
I'm still walking in the fog... and can't see much on the video screen.
Thanks.
greeting
How can you make data visible on which screen with the vpoke? I would then like, for example, Send data from bank 45 to the video ram.
I'm still walking in the fog... and can't see much on the video screen.
Thanks.
greeting
- desertfish
- Posts: 1123
- Joined: Tue Aug 25, 2020 8:27 pm
- Location: Netherlands
Re: prog8 : vpoke not function with %import syslib
I don't understand the question. You'll have to be more specific please. What did you try? What did you expect to happen? What happened instead?
Note that VPOKE really is not the best thing to put stuff on the screen: it'll be very slow or cumbersome or both, compared to the alternatives:
For text output there is txt.print/ txt.chrout, or txt.setcc and friends. For bitmap output you're much better off just using one of the graphics modules, or perhaps the GRAPH_* routines that exist in the kernal.
Note that VPOKE really is not the best thing to put stuff on the screen: it'll be very slow or cumbersome or both, compared to the alternatives:
For text output there is txt.print/ txt.chrout, or txt.setcc and friends. For bitmap output you're much better off just using one of the graphics modules, or perhaps the GRAPH_* routines that exist in the kernal.
Re: prog8 : vpoke not function with %import syslib
Thanks, I mean the routines in the kernel too.
I don't know where I put which data in, for example to draw a line, write a text or set a point with certain colors.
It's all still so foggy to me.
Thanks.
-------------------------------
For bitmap output you're much better off just using one of the graphics modules, or perhaps
the GRAPH_* routines that exist in the kernal.
------------------------------
I don't know where I put which data in, for example to draw a line, write a text or set a point with certain colors.
It's all still so foggy to me.
Thanks.
-------------------------------
For bitmap output you're much better off just using one of the graphics modules, or perhaps
the GRAPH_* routines that exist in the kernal.
------------------------------
- ahenry3068
- Posts: 1194
- Joined: Tue Apr 04, 2023 9:57 pm
Re: prog8 : vpoke not function with %import syslib
You should study the routines here: https://github.com/X16Community/x16-doc ... 0KERNAL.md Most of the procedure names that pertain to Mode 128 (The graphics 256 color mode) start with either FB or GRAPH.funkheld wrote: ↑Thu Mar 07, 2024 8:20 am Thanks, I mean the routines in the kernel too.
I don't know where I put which data in, for example to draw a line, write a text or set a point with certain colors.
It's all still so foggy to me.
Thanks.
-------------------------------
For bitmap output you're much better off just using one of the graphics modules, or perhaps
the GRAPH_* routines that exist in the kernal.
------------------------------
Re: prog8 : vpoke not function with %import syslib
hello thanks for info and help.
greeting.
greeting.
- desertfish
- Posts: 1123
- Joined: Tue Aug 25, 2020 8:27 pm
- Location: Netherlands
Re: prog8 : vpoke not function with %import syslib
You could also study the source code for the "graphics" module to get an idea of how to do things?
https://github.com/irmen/prog8/blob/mas ... raphics.p8
https://github.com/irmen/prog8/blob/mas ... raphics.p8