I've been reading the programmers guide but can't figure out how to write a text character to a specific cursor pos with a specified fore/background color?
Is it just in the normal VERA VRAM?
If anyone has an example it would be very appreciated. I'm using C but ASM would also be useful.
GUI in text mode?
Re: GUI in text mode?
Nevermind. Found what I needed in Calliope Zsound code.
- JimmyDansbo
- Posts: 476
- Joined: Sun Apr 26, 2020 8:10 pm
- Location: Denmark
- Contact:
Re: GUI in text mode?
If you want to use kernal functions, you can use the plot function to place the cursor on specific coordinates. Then you use PETSCII codes to change color for both foreground and background (PETSCII $01). Last you use chrout to output characters and other PETSCII codes.
You could also have a look at VTUI library if you don't want to use kernal functions.
Or you could write directly to VERA
You could also have a look at VTUI library if you don't want to use kernal functions.
Or you could write directly to VERA
Visit my Github repo
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
Re: GUI in text mode?
Thanks for your reply.
I think I can get away with using just vtui_gotoxy and vtui_plot_char
I think I can get away with using just vtui_gotoxy and vtui_plot_char
- JimmyDansbo
- Posts: 476
- Joined: Sun Apr 26, 2020 8:10 pm
- Location: Denmark
- Contact:
Re: GUI in text mode?
Glad to hear that the VTUI library might be useful for you. Let me know if there are any questions or comments.
If you are only going to use gotoxy and plotchar, you may want to roll your own functions, you are welcome to copy from the VTUI library, they are only a few instructions each and hopefully the source has enough comments to be understandable.
If you are only going to use gotoxy and plotchar, you may want to roll your own functions, you are welcome to copy from the VTUI library, they are only a few instructions each and hopefully the source has enough comments to be understandable.
Visit my Github repo
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
Re: GUI in text mode?
I might end up making the functions I need in C. Using your code as a reference.
Forresten hvor bor du henne? Jeg bor på Samsø : )
Forresten hvor bor du henne? Jeg bor på Samsø : )
Re: GUI in text mode?
I'm using cc65. I was just hoping that writing directly to VERA would speed things up compared to the conio functions, but I haven't tested yet.Which C compiler are you using? The conio library should already include gotoxy and color commands.
- JimmyDansbo
- Posts: 476
- Joined: Sun Apr 26, 2020 8:10 pm
- Location: Denmark
- Contact:
Re: GUI in text mode?
Jeg bor på Nordyn
If you happen to come by nordfyn at the end of September, be sure to drop in on Retro Computing Fest
Visit my Github repo
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
Re: GUI in text mode?
Sound interesting. I'll mark the date and see how my schedule is at the time.If you happen to come by nordfyn at the end of September, be sure to drop in on Retro Computing Fest