Page 2 of 2

Re: Extending BASIC

Posted: Sun Dec 29, 2013 9:07 am
by Mobsie
Yeah :D thats exact the VDP-Range i think about. Very soon we have one of the best Basic and some people stop laugh :D

Re: Extending BASIC

Posted: Mon Dec 30, 2013 2:43 am
by @username@
Some other VDP functions added.

VREG Register, Value - Use this to configure video registers. Be careful - do not change modes!
VSAVE - Store VRAM to tape.
VLOAD - Go on, guess :)

I've attached a sample video showing them in action. VREG 5,38 and VREG 6,1 reset to BASIC82/83 default SAT and SPT.

As always, latest binary, source etc is in first post.

Re: Extending BASIC

Posted: Mon Dec 30, 2013 9:52 am
by Mobsie
Yes! Again i found no words :o

Re: Extending BASIC

Posted: Mon Dec 30, 2013 11:29 am
by Mobsie
I upload the video to youtube if someone don't want to download. Because is a must see!
I hope is okay for you.
http://youtu.be/uDh9X1DEEsc

Re: Extending BASIC

Posted: Mon Dec 30, 2013 12:12 pm
by Mobsie
I also upload the Basic sprite demo video :D
http://youtu.be/rIDRjJEQNb0

Re: Extending BASIC

Posted: Thu Jan 02, 2014 6:19 pm
by @username@
Happy New Year!

This update finally brings a function! Note that any new functions must be only 3 characters long, to fit in with the interpreter.

This is the final VDP function, VPK, short for VPeeK.

I've tried to automate it a little more too, so you'll notice b83p.exe and a patch.txt file. These are used to automatically update the program blocks when a new 'build' is performed.

Binary, source etc in first post.

Re: Extending BASIC

Posted: Thu Jan 02, 2014 9:29 pm
by Mobsie
Happy New Year!
And thanks again for your amazing great CV support.

Re: Extending BASIC

Posted: Fri Jan 03, 2014 1:33 pm
by @username@
BASIC83H "Speedup" patches

The speed up in 83H is to simply STOP the interrupt!

Code: Select all

ROM:76BA                 CLI
ROM:76BB                 LDA     $C
ROM:76BD                 BPL     loc_76BF
ROM:76BF
ROM:76BF loc_76BF:
ROM:76BF                 SEI
ROM:76C0                 AND     #$7F
ROM:76C2                 STA     $C
ROM:76C4                 LDA     $10
ROM:76C6                 CMP     #$83
ROM:76C8                 BNE     sub_76D0
ROM:76CA                 JSR     sub_B380
ROM:76CD                 JMP     loc_7858
Normally, the code at 76BD would wait until a VBL has been notified with $C high bit being set. This will stop RND updates etc.
Fortunately, the JOY function re-enables the interrupt.

Code: Select all

ROM:AB0E loc_AB0E:              
ROM:AB0E                 CLI
ROM:AB0F                 LDA     $C
ROM:AB11                 BPL     loc_AB0E
Although, the need to set CLI each iteration is unusual :) This also dispatches keyboard reads too. The only other function affected is RND, which will not update $2/$3.
This does make BASIC slow to read - as it takes 2 VBLANKS to read a single JOY direction, then another 2 to read button state - you see the problem.

The final patch in BASIC83H is for a printer. Although probably not useful, it may be of interest if you've had trouble printing.
BASIC83H changes the initialisation to output $00 rather than $7F of other basics. This I believe will be printer dependent.

Code: Select all

ROM:7E3E                 LDA     $E800
ROM:7E41                 LDA     #0
ROM:7E43                 STA     $E800
ROM:7E46                 LDA     #$36 
ROM:7E48                 STA     $E801
ROM:7E4B                 LDA     #$3E 
ROM:7E4D                 STA     $E801
ROM:7E50                 RTS

Re: Extending BASIC

Posted: Fri Jan 03, 2014 2:02 pm
by Mobsie
Thats very interesting, thanks for sharing. You able to fix this?