4
4
My own ZX Spectrum emulator written in C# and Avalonia UI. It emulates classic ZX Spectrum 16K, 48K and
5
5
128K computers.
6
6
7
- This is work in progress, I've been improving it quite a lot recently. However it is stable and usable.
8
- It can run most of the games and demos without any problems .
7
+ It is quite accurate and stable, it can run most of the games and demos without any issues, load protected
8
+ tapes .
9
9
10
- It's a cross-platform emulator that runs on Windows, Linux and macOS. Developed on macOS, so mostly tested
11
- on this platform. Needs some more testing on Linux.
10
+ It's a cross-platform emulator that runs on Windows, Linux and macOS. Developed on macOS, so generally tested
11
+ on this platform. Needs some more testing on Linux, seems to be running fine on Windows .
12
12
13
- This is my hobby project which I always wanted to do. It has been a lot of fun, and quite challenging, too.
14
- ZX Spectrum was my first computer and I love it. I am planning to keep it alive since I created it for my own
15
- use and I am using it to play games and demos.
13
+ This is my hobby project which I always wanted to do. It has been a lot of fun, and quite a challenge.
14
+ There are other emulators out there, but my focus was on making it better structured, easier to understand.
15
+ It is written all by hand, no AI generated code.
16
+
17
+ ZX Spectrum was my first computer and I still love it. I am planning to keep this project alive since
18
+ I have created it for my personal use to play games and demos. It is a lot of fun.
16
19
17
20
It uses several of my own libraries that I created for this project:
18
- - [ Z80 CPU emulator] ( https://github.com/oldbit-com/Z80/tree/spectron )
19
- - [ File format handling] ( https://github.com/oldbit-com/Spectron.Files )
20
- - [ Audio player] ( https://github.com/oldbit-com/Beep )
21
- - [ Gamepad support] ( https://github.com/oldbit-com/Joypad )
21
+
22
+ | Library | Description |
23
+ | --------------------------------------------------------| ----------------------------------------------|
24
+ | [ Z80] ( https://github.com/oldbit-com/Z80/tree/spectron ) | Generic Z80 CPU emulator |
25
+ | [ Files] ( https://github.com/oldbit-com/Spectron.Files ) | Handles TZX, Z80, SNA and other file formats |
26
+ | [ Beep] ( https://github.com/oldbit-com/Beep ) | Basic audio player, cross-platform, native |
27
+ | [ Joypad] ( https://github.com/oldbit-com/Joypad ) | Gamepad handler, cross-platform, native |
28
+
29
+ Solution consists of several projects:
30
+
31
+ | Project | Description |
32
+ | ------------------------| --------------------------------------------------------|
33
+ | Spectron | Avalonia based UI |
34
+ | Spectron.Debugger | Fully featured Code debugger, includes UI and controls |
35
+ | Spectron.Disassembly | Simple Z80 disassembler, used by the debugger |
36
+ | ** Spectron.Emulation** | This is the core of the emulator, e.g. the main thing |
37
+ | Spectron.Recorder | Audio and Video recording helper |
38
+
22
39
23
40
![ Main Window] ( docs/default.png?raw=true " Main Window ")
24
41
@@ -153,9 +170,9 @@ done in the background by converting static frames to a video stream with audio,
153
170
154
171
## Debugger
155
172
Debugger is available in the emulator. It is a simple debugger that allows you to inspect the CPU registers,
156
- memory and disassembly. You can step through the code, set breakpoints. This is still work in progress.
173
+ memory and disassembly. You can step through the code, set breakpoints.
157
174
158
- ### Commands
175
+ ### Shortcuts
159
176
- ** Step Over** - ` F10 ` \
160
177
For ` CALL ` , ` JR cc ` , ` JP cc ` , ` DJNZ ` , ` LDIR ` or ` LDDR ` instructions, debugger will try to step over the subroutine.
161
178
- ** Step Into** - ` F11 ` \
@@ -164,6 +181,19 @@ memory and disassembly. You can step through the code, set breakpoints. This is
164
181
Debugger will step out of the subroutine using the current return address on the stack.
165
182
So this will only work if the value on the stack contains return address.
166
183
184
+ ### Breakpoints
185
+
186
+ Two types of breakpoints are supported: on register value change or on memory write
187
+
188
+ #### Register breakpoints
189
+ Typical scenario is use a condition for PC register, for example ` PC==32768 ` . This would break execution
190
+ at the specified address. However any register can be used, for example ` HL==16384 ` , ` A==0x79 ` etc.
191
+
192
+ #### Memory breakpoints
193
+ Memory breakpoints can have two forms: trigger when specific value is written to e memory cell or more generic
194
+ when memory cell is written. For example ` 16384==32 ` will break when value ` 32 ` has been written to ` 16384 ` memory address.
195
+ If condition is just ` 16384 ` , execution will break when any value has been written to that address.
196
+
167
197
### Immediate window instructions, case insensitive:
168
198
- ` HELP ` - print help information
169
199
- ` PRINT [expression] ` or ` ? [expression] ` - prints a value of the expression
@@ -205,5 +235,4 @@ memory and disassembly. You can step through the code, set breakpoints. This is
205
235
- [ Material Icons] ( https://github.com/SKProCH/Material.Icons )
206
236
- [ ZX Spectrum Font] ( https://github.com/comptic/zx-spectrum-font )
207
237
- [ Hack Font] ( https://sourcefoundry.org/hack/ )
208
- - [ VT220 Font] ( https://github.com/svofski/glasstty/blob/master/Glass_TTY_VT220.ttf )
209
-
238
+ - [ VT220 Font] ( https://github.com/svofski/glasstty/blob/master/Glass_TTY_VT220.ttf )
0 commit comments