MockbaTheBorg / RunCPM

RunCPM is a multi-platform, portable, Z80 CP/M 2.2 emulator.
MIT License
412 stars 75 forks source link

[FAQ?] Graphics? Yes we can! #58

Closed drawkula closed 6 years ago

drawkula commented 6 years ago

Well... there is no standard for graphics with CP/M but there are SIXELs!

And because this kind of graphics is just like printing with a dot matrix printer, CP/M programs easily can do it if connected to a terminal capable of sixel graphics:

grafik

Above snapshot was taken from RunCPM in an XTerm on Debian9. There are more sixel enabled terminals and it should work similar, if you connect RunCPM on an Arduino-DUE to one of them.

These files...

(yeti@kumari:16)/home/wrk/runcpm/run/C/1$ ls -l MB6EL.*
-rw-r--r-- 1 yeti yeti  896 Aug 13 16:41 MB6EL.C
-rw-r--r-- 1 yeti yeti 3712 Aug 13 16:41 MB6EL.COM
-rw-r--r-- 1 yeti yeti  128 Aug 13 16:13 MB6EL.SUB

...are attached as: mb6el.zip

MockbaTheBorg commented 6 years ago

Damn this is cool !!! I never thought RunCPM could do it ... :)

drawkula commented 6 years ago

Sixel graphics behaves like a colour dot matrix printer but I did not use use colour to keep the example simple.

The Mandelbrot image is calculated in fixed point arithmetic to get an acceptable speed. With a maximum resolution of 1/4092 that sure is not able to yield deep zooms.

But I think it is ok as example and for wetting the appetite for more experiments. :-)

MiguelVis commented 6 years ago

@drawkula wrote:

Well... there is no standard for graphics with CP/M

Oh, yes, we already have a standard.

Its name is GSX (Graphics System eXtension) from Digital Research.

See also some GSX Screen Shots here.

drawkula commented 5 years ago

What I still haven't understood of Sixel graphics is how some applications manage to play animations and videos via Sixel functionality. I think I understood how to output graphics as if I'm commanding a 6 needles colour printer. But that's it for now.

On XTerm I see the graphics when XTerm gets the Sixel end command. Other terminals may behave differently. But there is a Xserver for Sixel terminals too and that gets updated whenever changes occur. That's still a mystery to me how that is done and "Read the (libsixel-)source, Luke!" is beyond my time budget and attention span.

The top msg contains a simple demo in HiTech-C.

The converted RunCPM icon from this snapshot...

20181110-093146-gmt--just_for_fun

...is bundled in 20181110-093820-GMT--just_for_fun.zip.