Skip to content

Get Kurzweil K2000 skeleton driver to boot.#9545

Merged
Robbbert merged 2 commits into
mamedev:masterfrom
psobot:k2000-mapping
Apr 21, 2022
Merged

Get Kurzweil K2000 skeleton driver to boot.#9545
Robbbert merged 2 commits into
mamedev:masterfrom
psobot:k2000-mapping

Conversation

@psobot

@psobot psobot commented Apr 11, 2022

Copy link
Copy Markdown
Contributor

(Apologies if the format or content of this PR deviates from MAME standards - this is my first pull request to the project and I tried to keep things roughly similar to what I've seen in existing MAME code.)

This PR gets the MAME driver for the Kurzweil K2000 to complete its boot sequence and land on the main UI:
image

I/O is still not working (no MIDI input), audio output is still not working, etc. Many comments have been left in the code to describe some of the reverse-engineering work undertaken to get things working so far. But it boots!

(cc @d235j, @Lord-Nightmare)

map(0x7e0000, 0x7e0001).w(FUNC(k2000_state::swap_bit_ctrl_w));

// Some sort of hardware mapping - initial firmware boot expects a 4 at $78000B
map(0x780000, 0x78FFFF).ram();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

address_map mixes up UPPERCASE and lowercase in mapping. Please use latter only.


// SROM - Setup ROM?
uint32 srom_base = 0x280000;
map(srom_base, srom_base + 0x40000 - 1).rom().region("maincpu", 0x100000);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imho calculations and notes aren't a thing for mapping. They should be as simple as possible so that the next guy debugging this doesn't struggle in understand what a given access should map to.
For notes, my suggestion is that if you need more than single liners then shouldn't be inside address_map at all but moved to a separate notes section, either near the relevant actual implementation detail or in file header. Also cfr. the floppy section just below this, where you repeat the mapping note twice.

@Robbbert
Robbbert merged commit f7eec60 into mamedev:master Apr 21, 2022
wilbertpol pushed a commit to wilbertpol/mame that referenced this pull request Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants