How to write games in BASIC

Tutorials and help articles.

Articles will be approved by our staff before posting. This is to ensure that the community gets the highest quality possible content.
Edmond D
Posts: 458
Joined: Thu Aug 19, 2021 1:42 am

Re: How to write games in BASIC

Post by Edmond D »

Uhfgood wrote: Tue Feb 21, 2023 7:16 pm Am I missing something? I have no idea how to access any tutorials. Actually looks like the html is borked for some reason. Is it just me?
As TonXP411 explained, a move from an different forum system to this one cause some issues.

As a start, look at https://www.8bitcoding.com/p/commander-x16.html for some tutorial info. Be aware that the VERA changed between the R38 and the current R41 emulator versions, plus some other minor changes along the way. Take a look at https://github.com/commanderx16/x16-emulator and scroll down to the release notes. Also https://github.com/commanderx16/x16-docs can help.

If you have issues, just post them here - the community has many people who like to help others.
EbonHawk
Posts: 17
Joined: Thu Mar 16, 2023 10:37 am

Re: How to write games in BASIC

Post by EbonHawk »

Has anyone tried the stuff mentioned on the first page link in R42?
https://www.8bitcoding.com/p/vera-overview.html

I couldn't get any of it to work in R42, so maybe it's just not compatible??
TomXP411
Posts: 1719
Joined: Tue May 19, 2020 8:49 pm

Re: How to write games in BASIC

Post by TomXP411 »

You just need to adapt the addresses based on the latest VERA configuration. Check out the docs directory in your emulator download; the addresses are all in there.
EbonHawk
Posts: 17
Joined: Thu Mar 16, 2023 10:37 am

Re: How to write games in BASIC

Post by EbonHawk »

Ahh, thank you, sir. I will check those out in more depth. I had looked at some but didn't find what I needed. Will check again.
DragWx
Posts: 306
Joined: Tue Mar 07, 2023 9:07 pm

Re: How to write games in BASIC

Post by DragWx »

I took a look at the assembly program at the very bottom of the page.

The problem is that the tutorial wants to write characters to the screen at VRAM address $00000, but the kernal's text-mode screen buffer is actually at VRAM address $1B000. If the assembly program is updated as follows, it'll work:

Code: Select all

4000   9C 25 9F   STZ $9F25
4003   9C 20 9F   STZ $9F20
4006   A9 B0      LDA #$B0
4008   8D 21 9F   STA $9F21
400B   A9 21      LDA #$21
400D   8D 22 9F   STA $9F22
4010   A9 01      LDA #$01
4012   8D 23 9F   STA $9F23
4015   1A         INC A
4016   C9 51      CMP #$51
4018   D0 F8      BNE $4012
401A   60         RTS
(also, I used the codex to enter/modify this assembly, instead of the monitor)
User avatar
DusanStrakl
Posts: 127
Joined: Sun Apr 26, 2020 9:15 pm
Location: Bay Area, California
Contact:

Re: How to write games in BASIC

Post by DusanStrakl »

Most of my tutorials and all of my games have been updated to run correctly on ROM R43. I am still checking last few but please let me know if you notice any errors anywhere.
I also edited the original post as it was corrupted after transfer from the old forum.
Zethnar
Posts: 2
Joined: Mon Aug 07, 2023 4:41 am

Re: How to write games in BASIC

Post by Zethnar »

Cheers for the hard work.

I ran through the snake tutorial a while back and thought it was pretty good. With the release of physical boards I've been getting interested in the X16 again. If you've gone through and updated your tutorials it sounds like it's a good time to go back through and do them all.
User avatar
DusanStrakl
Posts: 127
Joined: Sun Apr 26, 2020 9:15 pm
Location: Bay Area, California
Contact:

Re: How to write games in BASIC

Post by DusanStrakl »

Zethnar wrote: Mon Aug 07, 2023 4:48 am Cheers for the hard work.

I ran through the snake tutorial a while back and thought it was pretty good. With the release of physical boards I've been getting interested in the X16 again. If you've gone through and updated your tutorials it sounds like it's a good time to go back through and do them all.
Thanks. I am glad you are finding them useful. There is a lot of code and a lot of text so I am sure there are many errors still lurking in there. Just let me know if you run into any and I will update and fix whatever is necessary.
I am actually hoping to start another game in BASIC as soon as I finish my current project in assembly.
Post Reply