-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h
64 lines (53 loc) · 1.5 KB
/
config.h
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
#ifndef __CONFIG_H__
#define __CONFIG_H__
// max number of entries in drivemap.txt
// hardwired into BIOS:
// ; fixed data tables for four-drive standard
// ; ibm-compatible 8" disks
#define FD_DRIVES 4
#define HD_DRIVES 2
#define DRIVES (FD_DRIVES + HD_DRIVES)
#if !defined(PROGRAMS)
#if defined(USE_SD)
#define PROGRAMS "/cpm80/"
#else
#define PROGRAMS "/"
#endif
#endif
#if defined(USE_Z80)
#define PROCESSOR_H "z80.h"
typedef class z80 processor_t;
#else
#define PROCESSOR_H "i8080.h"
typedef class i8080 processor_t;
#endif
// uncomment to use TFT / VGA display
// otherwise serial terminal is used
//#define SCREEN_SERIAL_DSP
// boot RAM (cpm and cbios)
// we _must_ have memory above $BRAM_BASE
#define BRAM_BASE 0xe400u
#define CPM_BASE BRAM_BASE
#define CBIOS_BASE 0xfa00u
#if (SPIRAM_SIZE + RAM_SIZE >= 0x10000u)
// we can fill the entire 64kB address space
#define RAM_BASE 0x0000u
#define RAM_PAGES (RAM_SIZE / ram<>::page_size)
#define SPIRAM_BASE RAM_SIZE
#define SPIRAM_EXTENT (0x10000u - RAM_SIZE) / Memory::page_size
#else
// we need to leave a gap below $BRAM_BASE
#define BRAM_PAGES (0x10000 - BRAM_BASE) / ram<>::page_size
#define RAM_BASE 0x0000u
#define RAM_PAGES (RAM_SIZE / ram<>::page_size - BRAM_PAGES)
#define SPIRAM_BASE RAM_PAGES * ram<>::page_size
#define SPIRAM_EXTENT min(SPIRAM_SIZE, BRAM_BASE - SPIRAM_BASE) / Memory::page_size
#endif
#define BG_COLOUR BLACK
#define FG_COLOUR WHITE
#if defined(USE_ESPI)
#define ORIENT reverse_landscape
#else
#define ORIENT landscape
#endif
#endif