module BBS::Petscii::Canvas::Player
Plays PETSCII onto a Canvas the way the C64’s screen editor prints it: what a C64 shows after a #frame, #span or #patch, for tests and previews.
Constants
- CONTROLS
-
What a control code does, by code: the method that plays it.
- PRINTED
-
The codes the screen editor prints.
Public Instance Methods
Source
# File lib/bbs/petscii/canvas/player.rb, line 25 def feed(bytes) bytes.to_s.each_byte { |b| play(b) } self end
Plays bytes (PETSCII, a String) onto the screen: colours, reverse video, CLR, HOME, the cursor keys, RETURN, the character set switches and printable codes; the cursor wraps at the end of a row and the screen scrolls at the bottom. Other codes are skipped. The cursor, colour and reverse state carry over to the next call.
Returns self.