Author Topic: Graphics extension GSX for turbo pascal for pcw 8512  (Read 783 times)

0 Members and 1 Guest are viewing this topic.

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 720
  • Country: gb
  • PCW since '85
  • Liked: 157
  • Likes Given: 7
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #25 on: 15:08, 14 September 20 »
Hello,

Further to my last message, I have found a .ZIP file with the complete CB80 system on it, and I've checked the contents of the disk and everything is there, although there are some 'extras' that I don't have and this system would seem to be a slightly later version that the one I got back 198?.   Nothing major.

The disk files include the various bits for using GSX, incl various BAS files about this.   The system files are NOT there, but they would be on your system disks?

Also, I didn't have it to hand before, but I wondered, and did some digging in the garage and found the original box for CB80 are there was a third manual for the GSX system hidden away there.   Safe, but burried!

If you were going to try to do much with CB and GSX you would need the manuals.   Some bits of the language are a little different from other BASICs.

I'd repeat though, I'm not sure that GSX is really appropriate for any sort of gaming or animation.  Just too clumsy, and slow.   The WALBASIC system could well be better, even though not ideal.

A message or two ago you made some comments about Pascal.   I don't know what you know about Pascal, but the language was invented to support someone's ideas about 'structured programming', and Pascal very much reflects his ideas about sp.   Those people who embrace sp like Pascal.  Myself, I've always thought that far too much fuss is made about sp, I'm sure you can write bad code using Pascal, and you CAN write a well structured prog using BASIC!   But yes, with Pascal, it can be confusing to find the 'start' of the program at the end of the code, and the code generally not following anything like the logic of the software, it's just sp 'for the hell of it'?

Geoff   

Offline funkheld

  • CPC6128
  • ****
  • Posts: 244
  • Liked: 15
  • Likes Given: 0
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #26 on: 22:34, 14 September 20 »


Hello.

here I found cb80 and cbas2:
http://www.classiccmp.org/cpmarchives/cpm/Software/rlee/C/

demo:
---------------------
integer limit, count, prime, i, k
limit = 1000
dim flag%(limit)

print "*** ERATO in CBASIC / CB80 ***"
print " --- Start ---"
count = 0
for i = 0 to limit :flag%(i) = 1 :next
for i = 0 to limit
    if flag%(i) = 1 then \
        prime = i + i + 3 :\
        count = count + 1 :\
        k = i + prime :\
        while k <= limit :\
            flag%(k)=0 :\
            k = k + prime :\
        wend
next
print count;"PRIMZAHLEN errechnet"
--------------------------

cbas2 prim
run prim

slow, works as basic

cb80 prim
lk80 prim

prim.com

Super fast.
« Last Edit: 23:44, 14 September 20 by funkheld »

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 720
  • Country: gb
  • PCW since '85
  • Liked: 157
  • Likes Given: 7
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #27 on: 00:09, 15 September 20 »
Yes, the archive file I found had CBAS2.COM and CRUN2.COM.   On the basis of your info, CBAS2 is a semi compiler which creates a tokenised version which can then be run using the runtime module CRUN2.  Doing the full compile using CB80 and LK80 produces a fully compiled version.  These two progs (CBAS2 and CRUN2)were NOT included in the original CB80 I bought back in 198?

Geoff

Offline funkheld

  • CPC6128
  • ****
  • Posts: 244
  • Liked: 15
  • Likes Given: 0
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #28 on: 00:59, 15 September 20 »

this turbo pascal didn't leave me any peace either. from here I have a turb pascal which works:
http://www.classiccmp.org/cpmarchives/cpm/Software/rlee/B/BORLAND/


the graphic works without.
http://www.joyce.de/software/soft.htm

graphic without gsx

greeting



Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 720
  • Country: gb
  • PCW since '85
  • Liked: 157
  • Likes Given: 7
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #29 on: 02:10, 15 September 20 »
Yes, you could prob do the same with the WALBASIC, but I assume a lot slower.   You don't need GSX.

GSX is - as I think I said before - more aimed at 'business' systems'.  The main purpose of GSX is to allow the same code to woek on different machine, and to allow the same code to produce similar results using screen, different printers, plotter, etc.

Achieving this 'wastes' a lot of code, and a lot of system resources.

The WALBASIC will work ONLY for the PCW screen.   I don't think it will print, I don't think it will work on the CPC machines.

The better games for the PCW don't even use CP/M,   They have their own .EMS (System) prog which loads instead, they create their own graphics system which allows whatever they want/need.   The normal PCW has I think the one block of screen memory, better systems may use two blocks of screen RAM so that one screen image is being constructed while the other is displaying, when the new screen is ready the images are swapped.

What you really need is 'The PCW Graphics Toolkit' - only problem is no-one got around to creating this!  As far as I know.   Most of the folks buting the PCW were interested in the 'serious' software. Most of the fancier games were originally written for other machines, and the conversion is easier that starting from scratch.

Batman and 'Head over Heels' are good examples of what can be done if you totally bypass CP/M.   Habi did a PacMania game a couple years ago which also loads his own system.  The 3D-Clock-Chess game uses CP/M to load, then sets up it's own graphics system, but it returns to CP/M on exit.  Batman & HoverH could do it this way too, I've got HoverH but it's a long time since I last ran it.

It all depends on what you hope to achieve.

Geoff

Offline funkheld

  • CPC6128
  • ****
  • Posts: 244
  • Liked: 15
  • Likes Given: 0
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #30 on: 09:56, 15 September 20 »

It is difficult to find something for the pcw to do something with graphics. i liked this mallard-80 best.


now try to do something in TP. after I found a working TP with graphics without gsx.


greeting

Offline ComSoft6128

  • ..................................
  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.605
  • Country: scotland
  • CPC THEN CPC NOW
    • index.php?action=treasury
  • Liked: 1646
  • Likes Given: 3548
« Last Edit: 13:43, 15 September 20 by ComSoft6128 »

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 720
  • Country: gb
  • PCW since '85
  • Liked: 157
  • Likes Given: 7
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #32 on: 18:13, 15 September 20 »
Hm, interesting.   So there is at least one 'Graphics Toolkit' about.   I had a quick search, but no sign of anything to download, or more details.

However, this reminds me that I have another BASIC system, something called ExBASIC.   There was something posted on the forum a while back.   I've had a play with this, and it works, although I had a problem initially because it works with an old version of BASIC.COM ONLY, but once John Elliott advised of this, then things went OK.

This variant works using a 'patched' (modified) version of BASIC.COM, and the ExBASIC prog applies this patch and then runs BASIC.   The extra functions operate via the PRINT command.   The useful functions include MOVE, DRAW, PLOT very similar to WalBASIC but there are extra ones relating to STORE and RESTORE which save a block of screen and allow it to be restored., useful for graphics.  Other functions seem to be not so useful, or for things that can be done by normal methods.

It may be that this variant might be more useful for your purposes (whatever they are)?

The package includes some demo progs, and some image files which can be displayed within the process.  Oh, it'll print large text, and even upside-down text!  If that's what you need.

Geoff

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 720
  • Country: gb
  • PCW since '85
  • Liked: 157
  • Likes Given: 7
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #33 on: 20:33, 15 September 20 »
Hello,

In case you're interested, I attach a .dsk image of the ExBASIC package.

You need to run the EXBASIC prog, this will load then patch the BASIC.COM and proceed from there.   Check the example progs, and the READ.ME

The process will work ONLY with version 1.29 or BASIC.COM, which you MIGHT have already.   It does NOT seem to make a permanent change to this file.  It seems NOT to work with later versions of BASIC.COM.

Geoff

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.327
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 1037
  • Likes Given: 2489
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #34 on: 21:41, 15 September 20 »

Offline funkheld

  • CPC6128
  • ****
  • Posts: 244
  • Liked: 15
  • Likes Given: 0
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #35 on: 22:41, 15 September 20 »

hello, graphic things are coming to light here.
That's really great.


greeting

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 720
  • Country: gb
  • PCW since '85
  • Liked: 157
  • Likes Given: 7
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #36 on: 23:03, 15 September 20 »
Yes, who knows what's hiding in the undergrowth!

This new Graphics etc package is covering pretty much the same ground as the other two packages, it's not something that I'm THAT interested in, although I'll have a little play.  It's really up to you to see which of the systems would be most convenient to achieve whatever it is that you hope to do.

The latest one for example is the only one to suggest explicit provision for 'sprites'.

Geoff

Offline jevicac

  • CPC664
  • ***
  • Posts: 91
  • Country: es
  • Liked: 94
  • Likes Given: 27
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #37 on: 02:01, 16 September 20 »

As my friend Robcfg says, PCWWiki to the rescue:

http://www.habisoft.com/pcwwiki/doku.php?id=es:aplicaciones:exbasic_nabitchi


http://www.habisoft.com/pcwwiki/doku.php?id=es:aplicaciones:graphics_universe


We have some other graphic program more. If a specific one is needed, we can search for it. Hopefully they help you. In terms of graphics is what we have published for now.




« Last Edit: 02:02, 16 September 20 by jevicac »

Offline funkheld

  • CPC6128
  • ****
  • Posts: 244
  • Liked: 15
  • Likes Given: 0
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #38 on: 09:44, 16 September 20 »

I have basic (Mallard-80) and exbasic in m:


exbasic hangs, basic does not start.


greeting

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 720
  • Country: gb
  • PCW since '85
  • Liked: 157
  • Likes Given: 7
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #39 on: 17:15, 16 September 20 »
Hello,

I take it that this is the image that I attached for you, and you have copied the files on that image to M:?

The result you describe was one of the results that I had when I was using the wrong version of BASIC.COM.   It MUST be version 1.29 (as reported when BASIC starts up.

If you run BASIC directly, without using EXBASIC first, does BASIC report this version, and does BASIC work normally?  Does it work correctly if you use the disk image as A:?

Geoff

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 720
  • Country: gb
  • PCW since '85
  • Liked: 157
  • Likes Given: 7
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #40 on: 17:44, 16 September 20 »
Hello,

Just to be sure, I've put the image I posted into Joyce.

I've checked that BASIC runs correctly when started normally.   And it IS the correct version 1.29.

I then ran a couple of the demo progs, and they worked fine.

I then copied the files from A: to M:, and repeated, and everything worked fine on M:.

So, it must be something you've done?   Or CP/M-Box doesn't like the CPCEMU image, but I take it that the files copied normally, and the files on M: are the same size as the files on A:.

Geoff

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 720
  • Country: gb
  • PCW since '85
  • Liked: 157
  • Likes Given: 7
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #41 on: 17:58, 16 September 20 »
Hmm??

Further to the above, I fired up CP/M Box, loaded the same disk image into that as A:, and worked fine there.   Copied the main files to M: (M: isn't big enough for all the disk) and again, all worked fine.

You must have done something??

Geoff

Offline funkheld

  • CPC6128
  • ****
  • Posts: 244
  • Liked: 15
  • Likes Given: 0
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #42 on: 23:34, 16 September 20 »

Hi, Thank You.
it works now.


the exbasic is too encapsulated for me.
there's not much you can do with it.


I don't like it that much.


greeting

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 720
  • Country: gb
  • PCW since '85
  • Liked: 157
  • Likes Given: 7
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #43 on: 01:15, 17 September 20 »
Hm, well, setting (or unsetting) a single pixel on the screen is the lowest level action you can get, so that cannot be too encapsulated.   Yes, it is a problem that the action of setting each pixel always includes all the overhead of swapping banks, and displaying the screen, when really it would be better to be able to set up things once, set all the pixels of your character or image (a sprite ?), then display the complete image and then swap back banks.   Maybe that's what the newer system which DOES refer to sprites can do?

Even the simplest animation on a computer screen involves a LOT of work.

Oh, did you work out what was causing the problem with EXBASIC.   It's always useful to know what the trouble was, to help others avoid it in the future!

Geoff

Offline funkheld

  • CPC6128
  • ****
  • Posts: 244
  • Liked: 15
  • Likes Given: 0
Re: Graphics extension GSX for turbo pascal for pcw 8512
« Reply #44 on: 11:29, 17 September 20 »

I reinstalled exbasic then started it.
I didn't look for the error any further.


greeting