Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2.programmer > #1477
| From | D Finnigan <dog_cow@macgui.com> |
|---|---|
| Newsgroups | comp.sys.apple2.programmer |
| Subject | Method to address both Legend and Saturn RAM cards |
| Date | 2015-01-15 19:09 +0000 |
| Organization | Mac GUI |
| Message-ID | <dog_cow-1421349003@macgui.com> (permalink) |
After looking at the technical documentation for the Legend 64KC and the Saturn 32/64/128K RAM cards, it seems that one could write a common routine using 6502 indexed addressing to work on both models of RAM card. The Legend 64KC provides a bank select address at location $C084. This is a write only address used to select bank 0 through 3. The Saturn RAM cards use a series of addresses to select a bank, starting with $C084 for bank 0, $C085 for bank 1, $C086 for bank 2, and so on. So it seems to me that we could use indexed addressing with the X register and $C084 as the base address. First we should have an earlier subroutine detect which card is installed, or just ask the user, and store the setting in ZP location. The subroutine to select a bank should accept the bank number in the X-reg. Here's my first naive attempt at writing the routine. There's definitely room for improvement, but this is the general idea: BANKBASE EQU $C084 ; BASE ADDRESS FOR BANK SELECT ADDR RAMTYPE EQU $06 ; TYPE OF RAM CARD INSTALLED * * * SELECT A 16K RAM BANK. DESIRED BANK NUMBER * SHOULD BE PASSED IN THE A-REG. * BANKSEL LDA RAMTYPE ; WHAT TYPE OF RAM CARD? BEQ :LEGEND ; 0 = LEGEND, 1 = SATURN TAX STA BANKBASE,X ; SELECT BANK RTS :LEGEND LDX #0 STA BANKBASE,X ; SELECT BANK RTS Documentation: <http://lostclassics.apple2.info/wp-content/files/Legend/64KC.pdf> <http://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Interface%20Cards/Memory/Saturn%20Systems%20RAM%20Board/Manuals/Saturn%20Systems%2064K%20and%20128K%20RAM%20Board%20-%20Operations%20Manual.pdf> -- ]DF$ Apple II Book: http://macgui.com/newa2guide/ Usenet: http://macgui.com/usenet/ <-- get posts by email! Apple II Web & Blog hosting: http://a2hq.com/
Back to comp.sys.apple2.programmer | Previous | Next — Next in thread | Find similar
Method to address both Legend and Saturn RAM cards D Finnigan <dog_cow@macgui.com> - 2015-01-15 19:09 +0000
Re: Method to address both Legend and Saturn RAM cards "Anton Treuenfels" <teamtempest@yahoo.com> - 2015-01-15 22:21 -0600
Re: Method to address both Legend and Saturn RAM cards gids.rs@sasktel.net - 2015-01-16 09:41 -0800
Re: Method to address both Legend and Saturn RAM cards D Finnigan <dog_cow@macgui.com> - 2015-01-16 19:08 +0000
Re: Method to address both Legend and Saturn RAM cards qkumba <peter.ferrie@gmail.com> - 2015-01-17 21:32 -0800
Re: Method to address both Legend and Saturn RAM cards gids.rs@sasktel.net - 2015-01-17 22:33 -0800
Re: Method to address both Legend and Saturn RAM cards gids.rs@sasktel.net - 2015-01-17 22:54 -0800
Re: Method to address both Legend and Saturn RAM cards Leandro Polimeno <leandro.polimeno@gmail.com> - 2015-02-10 04:53 -0800
Re: Method to address both Legend and Saturn RAM cards gids.rs@sasktel.net - 2015-02-10 21:19 -0800
Re: Method to address both Legend and Saturn RAM cards Leandro Polimeno <leandro.polimeno@gmail.com> - 2015-02-11 05:22 -0800
Re: Method to address both Legend and Saturn RAM cards D Finnigan <dog_cow@macgui.com> - 2015-01-18 10:09 +0000
Re: Method to address both Legend and Saturn RAM cards "Anton Treuenfels" <teamtempest@yahoo.com> - 2015-01-19 08:33 -0600
Re: Method to address both Legend and Saturn RAM cards D Finnigan <dog_cow@macgui.com> - 2015-01-19 18:29 +0000
Re: Method to address both Legend and Saturn RAM cards qkumba <peter.ferrie@gmail.com> - 2015-01-20 09:33 -0800
Re: Method to address both Legend and Saturn RAM cards "Anton Treuenfels" <teamtempest@yahoo.com> - 2015-01-20 17:06 -0600
csiph-web