Skip to content

Commit

Permalink
[P8085] Read control signals as bus
Browse files Browse the repository at this point in the history
Assign control signals, S0, S1, #RD, #WR and #INTA to P9 and read
those signals at once.
  • Loading branch information
tgtakaoka committed Apr 15, 2024
1 parent 4014ac5 commit 02a1bb7
Show file tree
Hide file tree
Showing 30 changed files with 7,783 additions and 2,166 deletions.
4 changes: 4 additions & 0 deletions debugger/i8085/devs_i8085.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ void DevsI8085::write(uint32_t addr, uint16_t data) const {
USART.write(addr, data);
}

uint16_t DevsI8085::vector() const {
return USART.vector();
}

Device &DevsI8085::parseDevice(const char *name) const {
if (strcasecmp(name, USART.name()) == 0)
return USART;
Expand Down
1 change: 1 addition & 0 deletions debugger/i8085/devs_i8085.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ struct DevsI8085 final : Devs {
bool isSelected(uint32_t addr) const override;
uint16_t read(uint32_t addr) const override;
void write(uint32_t addr, uint16_t data) const override;
uint16_t vector() const override;

Device &parseDevice(const char *name) const override;
void enableDevice(Device &dev) override;
Expand Down
10 changes: 8 additions & 2 deletions debugger/i8085/inst_i8085.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ namespace i8085 {

struct InstI8085 {
static constexpr uint8_t NOP = 0x00;
static constexpr uint8_t RST0 = 0xC7;
static constexpr uint8_t HLT = 0x76;
static constexpr uint8_t EI = 0xFB;
static constexpr uint8_t RET = 0xC9;
static constexpr uint8_t DI = 0xF3;
static constexpr uint8_t EI = 0xFB;

static constexpr uint16_t ORG_TRAP = 0x0024;
static uint8_t vec2Inst(uint8_t vec) { return RST0 | (vec & 0x38); }

private:
static constexpr uint8_t RST0 = 0xC7;
};

} // namespace i8085
Expand Down
Loading

0 comments on commit 02a1bb7

Please sign in to comment.