Skip to content
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

Adding Videx Card 80 Columns support for Apple II+ #38

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

abaffa
Copy link
Contributor

@abaffa abaffa commented Feb 8, 2024

Please check my code so we can fix project organization and standardization issues. The 80columns support for appleII+ is working but the I/O timing requires overclocking to 252mhz - the same is done by the solution for the v2analog board.

@markadev
Copy link
Owner

Thank you for the pull request. I will see if this can somehow be integrated but there are a couple major issues:

  • I don't want to rely on a Pico overclock, especially such a massive one, since some folks may get unlucky with their silicon and end up having hard to debug issues.
  • If I understand the changes to abus.pio correctly the VGA card will be causing a bus conflict on every read cycle

@abaffa
Copy link
Contributor Author

abaffa commented Feb 11, 2024

Ok, let me know if I can help with something.

I also don't like the high overclock but it's what makes it work for the I/O read and write cycles. I got this solution reading the project from the V2 Analog repository. As they added the option to emulate the Z80 for CP/M, I wondered they were doing reading and writing. The abus.pio code is also based on the version they modified and added the read/write response loop.

If the changes are a problem, I would suggest that you recommend this option (if you agree with that) as a branch or parallel version only for AppleII+ users since most users will probably not need the videx emulation because they are Apple//e users.

PS:

  • Cycle times were adjusted in abus.pio (abus program) due to overclocking.
  • The access to videx implemented in abus.c controls the response via abus.pio (program abus_device_read) through an interrupt (irq READ_DATA_AVAILABLE). This avoids a conflict during the cycles and waits the correct moment to write the output.
  • The slot 3 is virtual to let devsel available to setup the card (and change character fonts for example). Slot 3 must remain empty to be accessed virtually by reading requests via the address bus, otherwise it may create a conflict.
  • The videx uses addresses C800-CFFF during read cycle only after a request via iosel/devsel. This is how it was implemented in the real hardware and it is a well-behaved protocol because it is only activated when requested. I found out that it causes a conflict with the Grapper+ (printer interface) 'cos the grapper always writes to C800-CFFF even if you don't need it. In this case, the printer interface is the problem and causes the conflict due to lack of control over the use of the iostrobe.

@markadev
Copy link
Owner

OK gotcha, I see how the bus reads are working now. I like the idea of the "virtual" videx card in slot 3 even when the VGA card is in other slots.

I'm going to try splitting this into two parts...

Part 1 will be the videx memory shadowing and rendering code which will solve the "videx compatibility" use-case. This is so that folks with II+ and Videx cards already would be able to see the videx output through the VGA. This is a non-controversial change that fits in well with the current design and is a great addition on its own.

Part 2 would extend this to also add the bus read cycle support so that the VGA could could emulate the Videx card completely. This part requires the more invasive changes like the PIO modifications and overclocking where I want to explore alternative solutions.

Thanks again for getting this started!

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.

2 participants