1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#![feature(try_from)]
#![feature(type_alias_enum_variants)]
#![feature(type_ascription)]
#![feature(custom_attribute)]
#![recursion_limit="512"]
#[macro_use]
extern crate bitfield;
#[macro_use]
extern crate bitflags;
#[macro_use]
extern crate nom;
#[cfg(feature = "xferlib")]
extern crate curl;
#[cfg(feature = "xferlib")]
extern crate reqwest;
#[macro_use]
extern crate arrayref;
#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate dbg;
#[macro_use]
extern crate failure;
#[macro_use]
extern crate getset;
pub mod screen;
pub mod pixels;
pub mod image;
pub mod imageconverter;
pub mod ga;
pub mod asm;
pub mod assembler;
pub mod basic;
pub mod z80emu;
pub mod sna;
pub mod disc;
#[cfg(any(feature = "xferlib", feature = "xfer"))]
pub mod xfer;
pub use crate::disc::edsk::ExtendedDsk;
pub use crate::ga::{Ink, Palette, Pen};
pub mod util {
pub fn string_to_nb(source: &str) -> u32 {
let error = format!("Unable to read the value: {}", source);
if source.starts_with("0x") {
u32::from_str_radix(&source[2..], 16).expect(&error)
} else {
source.parse::<u32>().expect(&error)
}
}
}