-
Notifications
You must be signed in to change notification settings - Fork 2.2k
att6300p.cpp: Add support for 1.2MB drive (525hd) #14577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+151
−36
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
0158084
att6300p.cpp: Add support for 1.2MB drive (525hd)
donohoe00 7257b68
att6300p_fdc.cpp: Move FDC support into device-specific files.
donohoe00 62df586
att6300p.cpp: Fix enabling/disabling of A20-A23 address lines.
donohoe00 3effa7b
att6300p.cpp: Add comment explaining default drive densities.
donohoe00 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| // license:BSD-3-Clause | ||
| // copyright-holders: D. Donohoe | ||
|
|
||
| #include "emu.h" | ||
|
|
||
| #include "att6300p_fdc.h" | ||
|
|
||
| static void att6300p_floppies(device_slot_interface &device) | ||
| { | ||
| device.option_add("525hd", FLOPPY_525_HD); | ||
| device.option_add("35hd", FLOPPY_35_HD); | ||
| device.option_add("525dd", FLOPPY_525_DD); | ||
| device.option_add("35dd", FLOPPY_35_DD); | ||
| } | ||
|
|
||
| isa8_fdc_6300p_device::isa8_fdc_6300p_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : isa8_upd765_fdc_device(mconfig, ISA8_FDC_6300P, tag, owner, clock) | ||
| { | ||
| } | ||
|
|
||
| void isa8_fdc_6300p_device::device_add_mconfig(machine_config &config) | ||
| { | ||
| upd765a_device &upd765a(UPD765A(config, m_fdc, 8'000'000, false, false)); | ||
| upd765a.intrq_wr_callback().set(FUNC(isa8_fdc_6300p_device::fdc_irq_w)); | ||
| upd765a.drq_wr_callback().set(FUNC(isa8_fdc_6300p_device::fdc_drq_w)); | ||
|
|
||
| // According to "Getting Started with you AT&T 6300 Plus", when the | ||
| // system came in a two-floppy configuration, drive A (lower drive) | ||
| // was 1.2MB, and drive B was 360K. | ||
| FLOPPY_CONNECTOR(config, "fdc:0", att6300p_floppies, "525hd", isa8_fdc_device::floppy_formats).enable_sound(true); | ||
| FLOPPY_CONNECTOR(config, "fdc:1", att6300p_floppies, "525dd", isa8_fdc_device::floppy_formats).enable_sound(true); | ||
| } | ||
|
|
||
| void isa8_fdc_6300p_device::rc_map(address_map &map) | ||
| { | ||
| map(0x0, 0x0).rw(FUNC(isa8_fdc_6300p_device::rc_r), FUNC(isa8_fdc_6300p_device::rc_w)); | ||
| } | ||
|
|
||
| void isa8_fdc_6300p_device::map(address_map &map) | ||
| { | ||
| map(0x2, 0x2).rw(FUNC(isa8_fdc_6300p_device::dor_r), FUNC(isa8_fdc_6300p_device::dor_w)); | ||
| map(0x4, 0x5).m(m_fdc, FUNC(upd765a_device::map)); | ||
| } | ||
|
|
||
| void isa8_fdc_6300p_device::device_start() | ||
| { | ||
| set_isa_device(); | ||
| m_isa->install_device(0x0065, 0x0065, *this, &isa8_fdc_6300p_device::rc_map); | ||
| m_isa->install_device(0x03f0, 0x03f7, *this, &isa8_fdc_6300p_device::map); | ||
| m_isa->set_dma_channel(2, this, true); | ||
|
|
||
| isa8_upd765_fdc_device::device_start(); | ||
|
|
||
| m_fdc->set_rate(300000); | ||
|
|
||
| save_item(NAME(m_rate)); | ||
| } | ||
|
|
||
| uint8_t isa8_fdc_6300p_device::rc_r() | ||
| { | ||
| return m_rate; | ||
| } | ||
|
|
||
| void isa8_fdc_6300p_device::rc_w(uint8_t data) | ||
| { | ||
| static const int rates[4] = { 500000, 300000, 250000, 250000 }; | ||
| m_rate = rates[data&3]; | ||
| m_fdc->set_rate(m_rate); | ||
| } | ||
|
|
||
| DEFINE_DEVICE_TYPE(ISA8_FDC_6300P, isa8_fdc_6300p_device, "isa8_fdc_6300p", "ISA 8bits 6300 Plus FDC hookup") | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| // license:BSD-3-Clause | ||
| // copyright-holders: D. Donohoe | ||
|
|
||
| #include "emu.h" | ||
|
|
||
| #include "bus/isa/fdc.h" | ||
| #include "bus/isa/isa.h" | ||
| #include "imagedev/floppy.h" | ||
| #include "machine/upd765.h" | ||
|
|
||
| DECLARE_DEVICE_TYPE(ISA8_FDC_6300P, isa8_fdc_6300p_device) | ||
|
|
||
| class isa8_fdc_6300p_device : public isa8_upd765_fdc_device { | ||
| public: | ||
| isa8_fdc_6300p_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); | ||
|
|
||
| protected: | ||
| // device-level overrides | ||
| virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; | ||
| virtual void device_start() override ATTR_COLD; | ||
|
|
||
| void map(address_map &map) ATTR_COLD; | ||
| void rc_map(address_map &map) ATTR_COLD; | ||
|
|
||
| uint8_t rc_r(); | ||
| void rc_w(uint8_t data); | ||
|
|
||
| private: | ||
| int m_rate; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
525hdand525dda mistake or the sizes are really uneven by factory default? (I'd add a comment if latter)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the way they are by factory default, according to the User Guide. I can add a comment.