Author Topic: PCW graphics library  (Read 3666 times)

0 Members and 1 Guest are viewing this topic.

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 243
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
  • Liked: 234
  • Likes Given: 171
PCW graphics library
« on: 19:55, 21 July 15 »
Hi all!

Any interest in a graphics library for the Amstrad PCW?

I'm writting a RSX based library for CP/M Plus.

It should be usable from any computer language, say, Basic or assembler, because it has a standard BDOS interface, but I'm writting some additional libraries for MESCC, my Small-C variant:
  • xtext: for fonts and printing text with attributes (bold, italic, etc.).
  • xdraw: to set pixels, draw lines, circles, etc.
And I have in mind to write libraries to draw icons, sprites, etc. (the RSX has already a basic support for that).

It will be released under the GPL license.
 
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.914
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1122
  • Likes Given: 1898
Re: PCW graphics library
« Reply #1 on: 13:47, 22 July 15 »
My slogan reads "The User Formerly known as CP/M User" because of the amount of complaints I got, when I told other users I wasn't using GSX.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 243
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
  • Liked: 234
  • Likes Given: 171
Re: PCW graphics library
« Reply #2 on: 17:26, 22 July 15 »
My slogan reads "The User Formerly known as CP/M User" because of the amount of complaints I got, when I told other users I wasn't using GSX.
Well, GSX is good as CP/M is good for a lot of computers, including the Amstrad PCW (same OS for a variety of computers), but IMHO it is too big and slow for some purposes.
 
 
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.914
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1122
  • Likes Given: 1898
Re: PCW graphics library
« Reply #3 on: 12:45, 23 July 15 »
Well, GSX is good as CP/M is good for a lot of computers, including the Amstrad PCW (same OS for a variety of computers), but IMHO it is too big and slow for some purposes.


Huh, that's funny last time I recall a PCW had 256k minimum.  :D


I don't know GSX well enough to know what it can or can't do, though understand a number of CP/M systems which support graphics use it, so in a way the CP/M community treat that as if it was like DirectX for Windows (even though Windows was going longer than that).
But from what I've seen PCW breaks those rules, by using System Specific stuff which, as I understand it, can sometimes be the only way.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline MaV

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.103
  • Country: at
  • Ius summum saepe summa est malitia.
  • Liked: 400
  • Likes Given: 828
Re: PCW graphics library
« Reply #4 on: 13:51, 23 July 15 »
The idea behind GSX is to offer a solution for all possible graphical devices, so you're not limited to screen but there's printer, etc. The internal resolution is 32768x32768 and every command is scaled in software to the dimensions of the hardware it currently writes to (i.e. 720x256 for the display) which is extremely costly.

The idea is not speed but first and foremost compatibility across all possible CP/M machines. That's ideal for graphs and pie charts. And of course, this is slow by design.

 That's all from the top of my head. I haven't done anything with GSX for a very long time.
Black Mesa Transit Announcement System:
"Work safe, work smart. Your future depends on it."

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.914
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1122
  • Likes Given: 1898
Re: PCW graphics library
« Reply #5 on: 14:15, 23 July 15 »
I'm assuming that to have compatibility means an compromise in speed? Though source code for GSX is probably scarce, this site only has GSX86.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2275
  • Likes Given: 3478
Re: PCW graphics library
« Reply #6 on: 15:08, 23 July 15 »
I'm assuming that to have compatibility means an compromise in speed? Though source code for GSX is probably scarce, this site only has GSX86.
Each gsx implementation has it's own driver code.

The CPC one uses the firmware.
Don't know about the PCW one.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 243
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
  • Liked: 234
  • Likes Given: 171
Re: PCW graphics library
« Reply #7 on: 15:27, 23 July 15 »

Huh, that's funny last time I recall a PCW had 256k minimum.  :D


But only 61 Kb of TPA.  ;)
 
Add to the program code and data size, the memory requirements of GSX + drivers. That's a lot.  :'(
 
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 243
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
  • Liked: 234
  • Likes Given: 171
Re: PCW graphics library
« Reply #8 on: 15:32, 23 July 15 »
Each gsx implementation has it's own driver code.

The CPC one uses the firmware.
Don't know about the PCW one.

GSX is the same as BDOS for CP/M: the same for all CP/M machines, is standard.
But the drivers are specific of every device: printers, plotters, screens, etc.
The PCW has no firmware at all, and the BIOS USERF jump doesn't have any graphical function as draw, plot, etc.
Then, the screen drivers must to do all the work, resulting in a lot of code, and some features are missing.
 
« Last Edit: 23:12, 23 July 15 by FloppySoftware »
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.914
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1122
  • Likes Given: 1898
Re: PCW graphics library
« Reply #9 on: 12:13, 24 July 15 »


But only 61 Kb of TPA. 


Well that's just stupid, cause everyone knows CP/M Plus utilises the extra 64k and I can even get 61Kb of TPA out of my 6128, so I can only presume Memory is being wasted away by not doing anything on a 8256, unless you know otherwise? I suppose it would make sense if you had that set aside for a RAM disk.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.316
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1186
  • Likes Given: 83
Re: PCW graphics library
« Reply #10 on: 12:27, 24 July 15 »

Well that's just stupid, cause everyone knows CP/M Plus utilises the extra 64k and I can even get 61Kb of TPA out of my 6128, so I can only presume Memory is being wasted away by not doing anything on a 8256, unless you know otherwise? I suppose it would make sense if you had that set aside for a RAM disk.
Yep, it's your m: drive
IRC:  #Retro4All on Freenode

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.914
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1122
  • Likes Given: 1898
Re: PCW graphics library
« Reply #11 on: 12:29, 24 July 15 »
Each gsx implementation has it's own driver code.

The CPC one uses the firmware.


This page from John Elliott's website seems to support that since a number of standard GSX features aren't implemented in that version.
The PCW8256 version seems to borrow traits from the CPC version but replacing Firmware Drawing code with PCW specific, so has 2 sections. The 9512 has an Advanced version of GSX.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1982
  • Likes Given: 4650
Re: PCW graphics library
« Reply #12 on: 19:47, 24 July 15 »

This page from John Elliott's website seems to support that since a number of standard GSX features aren't implemented in that version.
The PCW8256 version seems to borrow traits from the CPC version but replacing Firmware Drawing code with PCW specific, so has 2 sections. The 9512 has an Advanced version of GSX.


OMG! I didn't know that the GSX drivers for CPC/PcW are actually that poor! So a new GFX library is a great idea for sure!!


One question I do have in mind... How much CP/M program are actually using GSX? Is it only DR Draw and DR Graph? Or are there more?

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.914
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1122
  • Likes Given: 1898
Re: PCW graphics library
« Reply #13 on: 01:22, 25 July 15 »
DR Logo with CP/M Plus uses GSX and who knows there maybe a number of Hisoft Pascal 80 programs which use GSX.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline radu14m

  • 464 Plus
  • *****
  • Posts: 393
  • Country: ro
  • Follow your dreams and believe !
  • Liked: 67
  • Likes Given: 552
Re: PCW graphics library
« Reply #14 on: 08:11, 25 July 15 »
this resultion is great"
  • 800x600 colour graphics screen (available through LOGO or GSX)."
such a resolution need the cpc too :)

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 243
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
  • Liked: 234
  • Likes Given: 171
Re: PCW graphics library
« Reply #15 on: 20:07, 10 August 15 »
Well, there's some progress in the work (or it was work in the progress?  ;) ).
 
Now I have a RSX and some MESCC libraries that use it.
 
With some luck, I will publish them very soon, including a small game that use some of these graphical functions.
 
In fact, the game is already finished, but I would like to publish it the next September, as a small present for our beloved Amstrad PCW, in its 30th anniversary.  :D :D :D
 
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.350
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 1046
  • Likes Given: 2535
Re: PCW graphics library
« Reply #16 on: 20:55, 10 August 15 »
Coooooool!  8)


The PCW is starting to get the love it deserves, thank you very much!

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 833
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1061
  • Likes Given: 556
Re: PCW graphics library
« Reply #17 on: 21:23, 10 August 15 »
Great, I am looking forward to it! :)

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 16.071
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 3487
  • Likes Given: 6283
Re: PCW graphics library
« Reply #18 on: 17:32, 11 August 15 »
Looking forward to it, too!

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 243
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
  • Liked: 234
  • Likes Given: 171
PCW graphics library
« Reply #19 on: 19:42, 30 August 15 »
Hi all!
 
I have just uploaded XPCW to my website.
 
XPCW is a graphics and keyboard library for the Amstrad PCW, under the CP/M operating system.
 
It consists of a CP/M Plus RSX file, with some library files (.h) for MESCC, my own version of the Small-C compiler.
 
The RSX is written in Z80 assembler source code.
 
It can be accessed by any CP/M program or language, provided it follows its conventions (read the RSX source code for more information).
 
The XPCW.RSX file, has to be attached to any program that uses this library.
 
Only one MESCC library is needed (xpcw.h), the other are optional.
 
The libraries are:

•xpcw.h - Main library.
•xdraw.h - Functions to draw pixels, lines, etc.
•xtext.h - Functions to write text, set the font, change attributes, etc.
•xchrdef.h - Functions to get / set character definitions.
•xbitmap.h - Functions to draw bitmaps.
•xkeyb.h - Functions to access the keyboard.
 
You can download XPCW in binary and source code form, from my website (includes Squarex, a little game).
 
 
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 833
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1061
  • Likes Given: 556
Re: PCW graphics library
« Reply #20 on: 22:40, 30 August 15 »
Very cool, thank you for your work! Having a look at the source codes and the bresenham algorithms gave me a lot of new general motivation for coding for our 8bits :)

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM