Class: Atari800
Constant Summary
collapse
- UNICODE_EXCEPTIONS =
{
0x00=>0x2665,
0x01=>0x251C,
0x03=>0x2518,
0x04=>0x2524,
0x05=>0x2510,
0x06=>0x2571,
0x07=>0x2572,
0x08=>0x25E2,
0x09=>0x2597,
0x0A=>0x25E3,
0x0B=>0x259D,
0x0C=>0x2598,
0x0F=>0x2596,
0x10=>0x2663,
0x11=>0x250C,
0x12=>0x2500,
0x13=>0x253C,
0x14=>0x25CF,
0x15=>0x2584,
0x17=>0x252C,
0x18=>0x2534,
0x19=>0x258C,
0x1A=>0x2514,
0x1C=>0x2191,
0x1D=>0x2193,
0x1E=>0x2190,
0x1F=>0x2192,
0x7B=>0x2660,
0x7D=>0x21B0,
0x7E=>0x25C0,
0x7F=>0x25B6
}
- @@annotations =
nil
Constants inherited
from HostSystem
HostSystem::MAX_SCREENDUMP_LINES
Class Method Summary
collapse
Methods inherited from HostSystem
all_host_systems, font_data, hex_dump, pixels_between_characters, possible_file_systems, s_to_ascii, start_track, to_screendump
extended
Class Method Details
.annotations ⇒ Object
89
90
91
|
# File 'lib/host_systems/Atari800.rb', line 89
def self.annotations
@@annotations=YAML::load(File.open(File.dirname(__FILE__)+"/atari_800_symbols.yaml")) if @@annotations.nil?
end
|
.atascii_to_unicode(b) ⇒ Object
79
80
81
82
83
84
85
86
|
# File 'lib/host_systems/Atari800.rb', line 79
def self.atascii_to_unicode(b)
u=UNICODE_EXCEPTIONS[b]
if (u.nil?) then
return b
else
u
end
end
|
.char_to_screen_code(char) ⇒ Object
35
36
37
38
39
40
41
42
|
# File 'lib/host_systems/Atari800.rb', line 35
def self.char_to_screen_code(char)
b=char[0]
case b
when 0..31 then return b+64
when 32..95 then return b-32
else return b
end
end
|
.default_background_colour ⇒ Object
131
132
133
|
# File 'lib/host_systems/Atari800.rb', line 131
def self.default_background_colour
PNG::Color.new(0x00,0x51,0x84,0xFF)
end
|
.default_foreground_colour ⇒ Object
127
128
129
|
# File 'lib/host_systems/Atari800.rb', line 127
def self.default_foreground_colour
PNG::Color.new(0x63,0xB6,0xE7,0xFF)
end
|
.default_screen_width ⇒ Object
110
111
112
|
# File 'lib/host_systems/Atari800.rb', line 110
def self.default_screen_width
40
end
|
.disassemble(buffer, start_address = 0) ⇒ Object
93
94
95
96
|
# File 'lib/host_systems/Atari800.rb', line 93
def self.disassemble(buffer,start_address=0)
require 'D65'
D65.disassemble(buffer,start_address,annotations)
end
|
.font_data_filename ⇒ Object
98
99
100
|
# File 'lib/host_systems/Atari800.rb', line 98
def self.font_data_filename
File.dirname(__FILE__) +"/atari-800-font.bin"
end
|
.font_height ⇒ Object
122
123
124
|
# File 'lib/host_systems/Atari800.rb', line 122
def self.font_height
8
end
|
.font_width ⇒ Object
118
119
120
|
# File 'lib/host_systems/Atari800.rb', line 118
def self.font_width
8
end
|
.full_name ⇒ Object
12
13
14
|
# File 'lib/host_systems/Atari800.rb', line 12
def self.full_name
"Atari 400/800"
end
|
.line_break_chars ⇒ Object
106
107
108
|
# File 'lib/host_systems/Atari800.rb', line 106
def self.line_break_chars
[0x9b]
end
|
.max_screen_width ⇒ Object
114
115
116
|
# File 'lib/host_systems/Atari800.rb', line 114
def self.max_screen_width
40
end
|
.screen_code_to_atascii(b) ⇒ Object
27
28
29
30
31
32
33
|
# File 'lib/host_systems/Atari800.rb', line 27
def self.screen_code_to_atascii(b)
case b
when 0..63 then return b+32
when 64..95 then return b-64
else return b
end
end
|
.screen_rows ⇒ Object
102
103
104
|
# File 'lib/host_systems/Atari800.rb', line 102
def self.screen_rows
24
end
|
.to_ascii(b) ⇒ Object
16
17
18
19
20
21
22
23
|
# File 'lib/host_systems/Atari800.rb', line 16
def self.to_ascii(b)
if b==0x9b then
"\n"
else
b.chr
end
end
|