Graphics extension GSX for turbo pascal for pcw 8512

Started by funkheld, 10:02, 09 September 20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GeoffB17

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   

funkheld

#26


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.

GeoffB17

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

funkheld


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



GeoffB17

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

funkheld


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

ComSoft6128


GeoffB17

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

GeoffB17

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

robcfg


funkheld


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


greeting

GeoffB17

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

jevicac

#37

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.





funkheld


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


exbasic hangs, basic does not start.


greeting

GeoffB17

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

GeoffB17

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

GeoffB17

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

funkheld


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

GeoffB17

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

funkheld


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


greeting

ddw

Quote from: funkheld on 22:59, 14 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



Hi! Can you share some details on how you have done this, exactly? GSX doesn't seem to work at all with Turbo Pascal. Using gengraf.com to attach the GSX loader to a random binary generated by TP results in : Not enough memory. Program aborted.


Another way to use graphics would be nice. If that doesn't work, i guess we need to use Hisoft C :)


Thanks!

zzarko

Not PCW related, but last year I have worked on a set of graphic routines for an obscure ex-Yugoslav CP/M computer called TIM-011. That one has its graphics in I/O space of Z80 and has no games using graphics whatsoever, AFAIK. I have managed to make pixel plotting, line plotting, font drawing and sprite drawing routines for it, at, I think, acceptable speed (especially as I was learning Z80 assembly along the way; though I come from 6502 background). Here is one experiment with sprites, just to see how fast it can draw:



There is no emulator for TIM-011 (actually, there is one started in MAME, but it is non-functional), so I hacked its video-memory layout inside an existing CP/M emulator, just to be able to develop the routines. Anyhow, complete source code is available, (I do not know if it would be usable for PCW, as I do not know its video memory organization), you can find it at:

https://bitbucket.org/zzarko/tim011-tools/
464,664,6128,6128+,NC150,NC200,Joyce512,PPC512, PenPad, www.oncuponabyte.org

Powered by SMFPacks Menu Editor Mod