|
Post by hydrophilic on Jun 9, 2014 21:50:17 GMT
I wasn't sure if this topic should go under BASIC or VDC programming. But since you only need to understand BASIC in order to use it, I put the topic here. BASIC 7.80 is a language extension for the Commodore 128. It makes all (well most) of the bitmap commands of v7.0 run on the 80-column (VDC) screen! I know it is 30 years too late, and since there is already BASIC 8, you may be wondering why? I'll tell you. BASIC 8 syntax is 100% incompatible with BASIC 7. If you want to port a bitmap program from C16, Plus/4, or C128 (40-columns), then you will have a HUGE chore ahead of you, trying to translate the syntax. Also, BASIC 8 will crash if you attempt to use 40-column bitmap graphics. And the kludge BASIC 8 uses to implement new commands means that error trapping is also working differently (I would say "broken"). BASIC 7.80 does not add any new commands. It just makes existing v3.5 and v7.0 bitmap commands work on the VDC: - BOX
- CHAR
- CIRCLE
- COLOR
- DRAW
- GRAPHIC
- GSHAPE
- LOCATE
- PAINT
- RCLR()
- RDOT()
- RGR()
- SCALE
- SCNCLR
- SSHAPE
- WIDTH
Download the BASIC 7.80 distribution here. It includes a D64 disk image with program BASIC 7.80; just RUN it. It will auto-boot if in drive 8 when the C128 is turned on. The BASIC 7.80 program is also included as a raw "prg" type file if you like to use hard drive / SD2IEC. It includes a ReadMe file in HTML format that should get you started, so I won't say a lot here, unless you have questions. It also includes the source code, in case you want to see how it works or try to add the missing features...
Things not working:
- Multi-color bitmap modes. The VDC can not display 4 colors in a single cell. You might be able to emulate this with interlace mode.
- Split-screen modes. The VDC has no raster interrupt. Should be possible with synchronized CIA interrupt.
- Sprites. The VDC has no hardware sprites. In bitmap mode, you could (slowly) emulate them in software. More tricky in text mode!
- Some colors. The VDC does not have medium gray or orange. I recommend substition of dark cyan and brown.
The download includes 4 BASIC programs that were rather simply converted from 40-column version. The mandelbrot program should not be tried unless you have SuperCPU or are prepared to let the software run for several hours!! Yes, BASIC 7.80 works fine with SuperCPU.
If you only have 16K VDC RAM, then only monochrome bitmap mode (GRAPHIC 6) is possible. With 64K VDC RAM, either monochrome or "standard" 8x8 color cells is possible (with GRAPHIC 8). A later version (7.81?) should add color for 16K user (at the cost of reduced bitmap size) and non-standard color cells (8x4, 8x2, etc.)
Thanks to Mirkosoft who motivated me to finish this, and also tested it on 64K V-RAM (I only have 16K).
|
|
|
Post by VDC 8x2 on Jun 10, 2014 17:41:15 GMT
Awsome! Thank you for the code. going to fire it up and test it.
Do you use any new zero page locations for your commands?
What about 8x4 and 8x2 graphic modes?
Where does it store the VDC graphic info in 64k VDC?
|
|
|
Post by hydrophilic on Jun 11, 2014 18:07:48 GMT
No new ZP locations used. Did adopt some unused bits in the 'mode' flag (at $d7 I think).
Because there is no way to specify cell size in BASIC 7.0 there is no way to set 8x4 or 8x2 in BASIC 7.80. This is just a straight port of v7.0 to 80-columns, no new features. A later version (7.81?) can have these.
For 64K, it stores bitmap starting at $4000, and color starting at $c000. I figure in later versions, with smaller cell size, you could have upto 32K for bitmap and 16K for colors, which works out pretty nice for 8x2... you can have 80x204 cells this way (640*408 pixels). Or 90x182 cells (720x364 pixels). Well I think you would need interlace for that many rasters, but I don't want to mess with interlace!
|
|
|
Post by VDC 8x2 on Jun 11, 2014 20:56:42 GMT
Is there a way to overload the bsave and bload commands to save to and from vdc memory?
vdc would most likely be too slow for that.
|
|
|
Post by VDC 8x2 on Jun 11, 2014 21:03:25 GMT
$D8 GRAPHM has some unused bits. They could be used to indicate color cell size in the future.
|
|
|
Post by donno128 on Jun 20, 2014 2:22:23 GMT
Wow! Bolt from the blue! I need to thank you for all this work you've been doing, the CBM BASIC REFERENCE and now this, among others. A little sleep and in the morning fire up the XE1541. Thanks, Hydrophilic!
|
|
|
Post by hydrophilic on Jun 21, 2014 5:40:13 GMT
In regards to saving, Mirkosoft suggested VPEEK and VPOKE to access VDC RAM. Although I think that is a good idea, it would be too cumbersome to Load/Save a bitmap. So maybe something like VFETCH, VSTASH, VSWAP ? In other words, treat the VDC RAM like a slow REU. Then you could, for example, BLOAD an image into RAM (Bank 1) and then VSTASH it for display. Or reverse the process to save an image. Even if you don't use bitmap graphics, it could be useful to buffer data... well useful if you don't have a much faster & more spacious REU Thanks for the feedback, donno128. If you really want to thank me, write some cool app for the C128 and release it.
|
|
|
Post by VDC 8x2 on Jun 21, 2014 17:53:33 GMT
The V commands are a good idea!
It would make it so much easier to work with the vdc from basic.
|
|
|
Post by robertb on Feb 22, 2015 6:52:51 GMT
With Hydro's kind permission, I've been thinking of distributing BASIC 7.80 on chip at this year's CommVEx for the 30th anniversary of the C128. What would be needed to make this happen? 8K EPROMs? EPROM adapters? On another note, does BASIC 7.80 play nice with JiffyDOS? Is it compatible with WalrusSoft's BASIC 8? FCUG celebrating 33 years, Robert Bernardo Fresno Commodore User Group www.dickestel.com/fcug.htm
|
|
|
Post by VDC 8x2 on Feb 22, 2015 19:54:04 GMT
It is incompatible with basic 8. I don't know how it plays with JiffyDOS
|
|