Small consistency change in the 8-bit memory model.

Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
Adrian.Conlon 2017-07-05 17:44:47 +01:00
parent 0e7ad4dd01
commit 6db32ae7c5

View File

@ -43,7 +43,7 @@ namespace EightBit {
Memory(uint16_t addressMask); Memory(uint16_t addressMask);
// Only fired with read/write methods // Only fired with read/write methods
Signal<AddressEventArgs> WritingByte; Signal<AddressEventArgs> WrittenByte;
Signal<AddressEventArgs> ReadingByte; Signal<AddressEventArgs> ReadingByte;
register16_t& ADDRESS() { return m_address; } register16_t& ADDRESS() { return m_address; }
@ -80,10 +80,9 @@ namespace EightBit {
} }
void write(uint16_t offset, uint8_t value) { void write(uint16_t offset, uint8_t value) {
AddressEventArgs e(offset, value);
WritingByte.fire(e);
ADDRESS().word = offset; ADDRESS().word = offset;
reference() = value; reference() = value;
WrittenByte.fire(AddressEventArgs(offset, value));
} }
void clear(); void clear();