Mercurial > repos > blastem
comparison z80_util.c @ 1715:4fd84c3efc72
Implement 16-bit addition in new Z80 core along with necessary CPU DSL fixes to make them work right
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 29 Jan 2019 23:56:48 -0800 |
parents | c2324849a5e5 |
children | ca2336469397 |
comparison
equal
deleted
inserted
replaced
1714:e170a0f75c4f | 1715:4fd84c3efc72 |
---|---|
1 | 1 |
2 void z80_read_8(z80_context *context) | 2 void z80_read_8(z80_context *context) |
3 { | 3 { |
4 context->cycles += 3 * context->opts->gen.clock_divider; | |
4 context->scratch1 = read_byte(context->scratch1, NULL, &context->opts->gen, context); | 5 context->scratch1 = read_byte(context->scratch1, NULL, &context->opts->gen, context); |
5 } | 6 } |
6 | 7 |
7 void z80_write_8(z80_context *context) | 8 void z80_write_8(z80_context *context) |
8 { | 9 { |
10 context->cycles += 3 * context->opts->gen.clock_divider; | |
9 write_byte(context->scratch2, context->scratch1, NULL, &context->opts->gen, context); | 11 write_byte(context->scratch2, context->scratch1, NULL, &context->opts->gen, context); |
10 } | 12 } |
11 | 13 |
12 void z80_io_read8(z80_context *context) | 14 void z80_io_read8(z80_context *context) |
13 { | 15 { |