Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2.programmer > #4217 > unrolled thread
| Started by | Anthony Ortiz <anthonypaulo@gmail.com> |
|---|---|
| First post | 2018-02-14 20:26 -0800 |
| Last post | 2018-02-15 03:00 -0800 |
| Articles | 18 — 6 participants |
Back to article view | Back to comp.sys.apple2.programmer
RamWorks test Anthony Ortiz <anthonypaulo@gmail.com> - 2018-02-14 20:26 -0800
Re: RamWorks test gids.rs@sasktel.net - 2018-02-15 00:43 -0800
Re: RamWorks test Brian Patrie <bpatrie@bellsouth.spamisicky.net> - 2018-02-15 07:38 -0600
Re: RamWorks test Anthony Ortiz <anthonypaulo@gmail.com> - 2018-02-15 05:48 -0800
Re: RamWorks test Anthony Ortiz <anthonypaulo@gmail.com> - 2018-02-15 21:25 -0800
Re: RamWorks test Anthony Ortiz <anthonypaulo@gmail.com> - 2018-02-15 21:57 -0800
Re: RamWorks test gids.rs@sasktel.net - 2018-02-16 01:23 -0800
Re: RamWorks test Antoine Vignau <antoine.vignau@laposte.net> - 2018-02-16 05:51 -0800
Re: RamWorks test gids.rs@sasktel.net - 2018-02-16 09:09 -0800
Re: RamWorks test gids.rs@sasktel.net - 2018-02-16 09:10 -0800
Re: RamWorks test gids.rs@sasktel.net - 2018-02-16 09:43 -0800
Re: RamWorks test Anthony Ortiz <anthonypaulo@gmail.com> - 2018-02-16 18:09 -0800
Re: RamWorks test Antoine Vignau <antoine.vignau@laposte.net> - 2018-02-16 18:43 -0800
Re: RamWorks test Anthony Ortiz <anthonypaulo@gmail.com> - 2018-02-16 18:59 -0800
Re: RamWorks test gids.rs@sasktel.net - 2018-02-17 00:53 -0800
Re: RamWorks test Michael J. Mahon <mjmahon@aol.com> - 2018-02-17 09:56 -0600
Re: RamWorks test James Davis <JPD.Enterprises@outlook.com> - 2018-02-15 00:47 -0800
Re: RamWorks test Antoine Vignau <antoine.vignau@laposte.net> - 2018-02-15 03:00 -0800
| From | Anthony Ortiz <anthonypaulo@gmail.com> |
|---|---|
| Date | 2018-02-14 20:26 -0800 |
| Subject | RamWorks test |
| Message-ID | <10c538b8-b09d-41a3-a4cd-710e893c88bf@googlegroups.com> |
RamWorks publishes a bank test routine :
Available Banks
The following subroutine will find all valid banks, determine the
size of RamWorks memory, and save the results into BankTbl.
BankTbl will have the number of 64K banks found, followed by the
table of valid bank numbers. Keep in mind that the bank numbers
are not necessarily linear. For example: 'BankTbl:08 00 01 02 03
04 05 06 07'indicates a 512K RamWorks containing banks 0 through 7.
BankSel EQU $C073
MaxMem EQU 3*16 ;Maximum desired, 3 megabytes in this example
*Write bank number to each bank
STA $C009 ;Store in alternate zero page
LDY #$7F ;Valid banks range $00 to $7F
FindBanks
STY BankSel ;Go through each bank
STY $00 ;Store the bank number
TYA
EOR #$FF
STA $01 ;Second self-check
DEY
BPL FindBanks
*Read them back to find valid banks and save in table
LDA #$00
TAY
TAX
FindThem
STY BankSel ;Search through all banks
STA BankSel+3
CPY $00
BNE NotOne ;Check bank number
TYA
EOR #$FF
CMP $01 ;Check second double-check
BNE NotOne
INX
TYA ;Found valid bank-save in table
STA BankTbl,X
CPX #MaxMem ;Found all banks to be used
BCS Done
NotOne
INY ;Go through all valid bank ranges
BPL FindThem
*Ending routine
Done
LDA #$00 ;Reset to video bank
STA BankSel
STA $C008
STX BankTbl ;Size of Ram card
LDA #$FF
STA BankTbl+1,X ;Mark end of table
JMP Continue
BankTbl DS MaxMem+2
Continue EQU *
Does anyone know if this is already conveniently compiled into a dsk image on asimov? If not, what would you recommend I use to compile it?
[toc] | [next] | [standalone]
| From | gids.rs@sasktel.net |
|---|---|
| Date | 2018-02-15 00:43 -0800 |
| Message-ID | <721506a7-8f12-4e21-bd8f-46a312eb4a39@googlegroups.com> |
| In reply to | #4217 |
On Wednesday, February 14, 2018 at 10:26:31 PM UTC-6, Anthony Ortiz wrote: > RamWorks publishes a bank test routine : > > Available Banks > > The following subroutine will find all valid banks, determine the > size of RamWorks memory, and save the results into BankTbl. > BankTbl will have the number of 64K banks found, followed by the > table of valid bank numbers. Keep in mind that the bank numbers > are not necessarily linear. For example: 'BankTbl:08 00 01 02 03 > 04 05 06 07'indicates a 512K RamWorks containing banks 0 through 7. > > BankSel EQU $C073 > MaxMem EQU 3*16 ;Maximum desired, 3 megabytes in this example > > *Write bank number to each bank > STA $C009 ;Store in alternate zero page > LDY #$7F ;Valid banks range $00 to $7F > FindBanks > STY BankSel ;Go through each bank > STY $00 ;Store the bank number > TYA > EOR #$FF > STA $01 ;Second self-check > DEY > BPL FindBanks > *Read them back to find valid banks and save in table > LDA #$00 > TAY > TAX > FindThem > STY BankSel ;Search through all banks > STA BankSel+3 > CPY $00 > BNE NotOne ;Check bank number > TYA > EOR #$FF > CMP $01 ;Check second double-check > BNE NotOne > INX > TYA ;Found valid bank-save in table > STA BankTbl,X > CPX #MaxMem ;Found all banks to be used > BCS Done > NotOne > INY ;Go through all valid bank ranges > BPL FindThem > *Ending routine > Done > LDA #$00 ;Reset to video bank > STA BankSel > STA $C008 > STX BankTbl ;Size of Ram card > LDA #$FF > STA BankTbl+1,X ;Mark end of table > JMP Continue > > BankTbl DS MaxMem+2 > Continue EQU * > > Does anyone know if this is already conveniently compiled into a dsk image on asimov? If not, what would you recommend I use to compile it? This is a poorly written RW memory checker. It is not necessary to compare with a maximum memory value or to keep a table of banks at the bottom. And after the "NotOne" label, if you change the BPL to BNE it will find all 16 Mb of the 16 Mb card. As it is written, it only finds 8 Mb max.
[toc] | [prev] | [next] | [standalone]
| From | Brian Patrie <bpatrie@bellsouth.spamisicky.net> |
|---|---|
| Date | 2018-02-15 07:38 -0600 |
| Message-ID | <p642hi$ibt$1@gioia.aioe.org> |
| In reply to | #4219 |
Someone posted an auxmem bank counter several months ago. Unfortunately i seem to have neglected to save the source message. (I feel like a schlock for not being able to give due credit.) But here's the disassembly of my binary (which is dated 2017-05-03). It counts all of AppleWin's 127 bank maximum. 0300: 8D 09 C0 STA $C009 0303: A0 7F LDY #$7F 0305: 8C 73 C0 STY $C073 0308: 84 00 STY $00 030A: 98 TYA 030B: 49 FF EOR #$FF 030D: 85 01 STA $01 030F: 88 DEY 0310: 10 F3 BPL $0305 0312: C8 INY 0313: 8C 73 C0 STY $C073 0316: C4 00 CPY $00 0318: D0 0A BNE $0324 031A: 98 TYA 031B: 49 FF EOR #$FF 031D: C5 01 CMP $01 031F: D0 03 BNE $0324 0321: C8 INY 0322: 10 EF BPL $0313 0324: A9 00 LDA #$00 0326: 8D 73 C0 STA $C073 0329: 8D 08 C0 STA $C008 032C: 98 TYA 032D: 4C DA FD JMP $FDDA
[toc] | [prev] | [next] | [standalone]
| From | Anthony Ortiz <anthonypaulo@gmail.com> |
|---|---|
| Date | 2018-02-15 05:48 -0800 |
| Message-ID | <99856b64-a06a-4d77-9636-28cb7d3e9260@googlegroups.com> |
| In reply to | #4222 |
Thx Brian, will try it out tonight!
[toc] | [prev] | [next] | [standalone]
| From | Anthony Ortiz <anthonypaulo@gmail.com> |
|---|---|
| Date | 2018-02-15 21:25 -0800 |
| Message-ID | <48d202d8-4393-4785-85b5-9fd1c3b0ae4b@googlegroups.com> |
| In reply to | #4223 |
On Thursday, February 15, 2018 at 8:48:39 AM UTC-5, Anthony Ortiz wrote: > Thx Brian, will try it out tonight! Works like a charm, many thanks! @gid : Given Brian's code, I'm guessing along with the change you suggested of changing BPL to BNE then you need to also change 304 to #$FF in order to count all the banks, right?
[toc] | [prev] | [next] | [standalone]
| From | Anthony Ortiz <anthonypaulo@gmail.com> |
|---|---|
| Date | 2018-02-15 21:57 -0800 |
| Message-ID | <822c1293-3e7f-4d53-9de9-917a34d8789b@googlegroups.com> |
| In reply to | #4224 |
On Friday, February 16, 2018 at 12:25:27 AM UTC-5, Anthony Ortiz wrote: > On Thursday, February 15, 2018 at 8:48:39 AM UTC-5, Anthony Ortiz wrote: > > Thx Brian, will try it out tonight! > > Works like a charm, many thanks! > > @gid : Given Brian's code, I'm guessing along with the change you suggested of changing BPL to BNE then you need to also change 304 to #$FF in order to count all the banks, right? Actually this code won't work correctly if you set 304 to $FF; code seems to be geared towards 8mb max as you mentioned.
[toc] | [prev] | [next] | [standalone]
| From | gids.rs@sasktel.net |
|---|---|
| Date | 2018-02-16 01:23 -0800 |
| Message-ID | <75b8ef5b-39ce-431a-a5fe-b32c3ff296c5@googlegroups.com> |
| In reply to | #4225 |
On Thursday, February 15, 2018 at 11:57:36 PM UTC-6, Anthony Ortiz wrote: > On Friday, February 16, 2018 at 12:25:27 AM UTC-5, Anthony Ortiz wrote: > > On Thursday, February 15, 2018 at 8:48:39 AM UTC-5, Anthony Ortiz wrote: > > > Thx Brian, will try it out tonight! > > > > Works like a charm, many thanks! > > > > @gid : Given Brian's code, I'm guessing along with the change you suggested of changing BPL to BNE then you need to also change 304 to #$FF in order to count all the banks, right? > > Actually this code won't work correctly if you set 304 to $FF; code seems to be geared towards 8mb max as you mentioned. Here is my code for 16 Mb LDY #$00 STA $C009 ]LP STY $C073 STY $00 TYA EOR #$FF STA $01 DEY BNE ]LP ]LP STY $C073 CPY $00 BNE DONE TYA EOR #$FF CMP $01 BNE DONE INY BNE ]LP DEY ; cannot be zero; $FF MAX DONE LDA #$00 STA $C073 STA $C008 RTS ; Y-reg returns with # of available banks
[toc] | [prev] | [next] | [standalone]
| From | Antoine Vignau <antoine.vignau@laposte.net> |
|---|---|
| Date | 2018-02-16 05:51 -0800 |
| Message-ID | <bf8c9ca8-17ce-4e64-a1f7-6e2e87950d45@googlegroups.com> |
| In reply to | #4226 |
From memory, AE's RamWorks source code returns the count and bank index of the valid bank numbers, which I believe the codes above do not ensure. If the existing/valid banks are 0, 1, 3, and 4, the returned count is 4. Donthe above codes ensure that? Antoine
[toc] | [prev] | [next] | [standalone]
| From | gids.rs@sasktel.net |
|---|---|
| Date | 2018-02-16 09:09 -0800 |
| Message-ID | <2defdabb-aaa8-4ea3-8b1e-a184c3d78d67@googlegroups.com> |
| In reply to | #4227 |
On Friday, February 16, 2018 at 7:51:54 AM UTC-6, Antoine Vignau wrote: > From memory, AE's RamWorks source code returns the count and bank index of the valid bank numbers, which I believe the codes above do not ensure. > > If the existing/valid banks are 0, 1, 3, and 4, the returned count is 4. > > Donthe above codes ensure that? > > Antoine For the most part, I feel it is unnecessary. Most cards purchased these days are fully populated, which means the check to see what banks are available is unnecessary. The second reason is if a card is only partly populated with 2,4 or 6 Mb, or, 10, 12 or 14, then the owners of the card usually run the RamWorks memory test program which shows which banks of chips are valid. The program shows the banks (of 8 chips) as banks 1, 2, 3 or 4. Most people who are normal, usually populate the card with chips starting with bank #1 and place them in order. Granted that there may occasionally be a bad bank of chips that may need to be removed and are out of sequence. The third reason is, if you are smart enough to program the Ramworks card to begin with, then you should be smart enough to figure the rest. And if you are a true programmer, then you will be looking to program for speed. Needing a look-up table because one is too lazy to move a set of chips in to the next sequential bank, may also lead to bloated and sloppy programming. And lastly, you have to leave something for the owner of the card to figure it out for themselves. It will be more rewarding for them and give them a sense of self worth. "Hey, I am not so dumb after all", kind of feeling. If you like any of my reasons for not checking for valid banks, please send me a "like". √√√√√√√√
[toc] | [prev] | [next] | [standalone]
| From | gids.rs@sasktel.net |
|---|---|
| Date | 2018-02-16 09:10 -0800 |
| Message-ID | <4ff12752-166a-4b78-836e-8f351c8dfefa@googlegroups.com> |
| In reply to | #4227 |
> If the existing/valid banks are 0, 1, 3, and 4, the returned count is 4. > > Donthe above codes ensure that? > I believe the returned count would be 1, because when bank 2 fails, the program stops.
[toc] | [prev] | [next] | [standalone]
| From | gids.rs@sasktel.net |
|---|---|
| Date | 2018-02-16 09:43 -0800 |
| Message-ID | <933b0232-9d5e-42d8-8e58-1edbcd2e15cb@googlegroups.com> |
| In reply to | #4229 |
> > Donthe above codes ensure that? > > > > > I believe the returned count would be 1, because when bank 2 fails, the program stops. One more disadvantage of mapping out bad or unused banks. If a card is fully populated with 8 or 16 Mb, and a bank of ram goes bad, programs will still work normally without the users knowledge. It could be years before one finds out that ram has gone bad. The advantage of the program listed here, is not only will one know that there is bad ram due to the greatly reduced ram available, the person will also know which bank has gone bad. This is because the program stops at the bad bank.
[toc] | [prev] | [next] | [standalone]
| From | Anthony Ortiz <anthonypaulo@gmail.com> |
|---|---|
| Date | 2018-02-16 18:09 -0800 |
| Message-ID | <ea16385e-f923-4028-999e-bd51f0a818a7@googlegroups.com> |
| In reply to | #4226 |
On Friday, February 16, 2018 at 4:23:13 AM UTC-5, gid...@sasktel.net wrote: > On Thursday, February 15, 2018 at 11:57:36 PM UTC-6, Anthony Ortiz wrote: > > On Friday, February 16, 2018 at 12:25:27 AM UTC-5, Anthony Ortiz wrote: > > > On Thursday, February 15, 2018 at 8:48:39 AM UTC-5, Anthony Ortiz wrote: > > > > Thx Brian, will try it out tonight! > > > > > > Works like a charm, many thanks! > > > > > > @gid : Given Brian's code, I'm guessing along with the change you suggested of changing BPL to BNE then you need to also change 304 to #$FF in order to count all the banks, right? > > > > Actually this code won't work correctly if you set 304 to $FF; code seems to be geared towards 8mb max as you mentioned. > > > Here is my code for 16 Mb > > LDY #$00 > STA $C009 > > ]LP STY $C073 > STY $00 > TYA > EOR #$FF > STA $01 > DEY > BNE ]LP > > ]LP STY $C073 > CPY $00 > BNE DONE > TYA > EOR #$FF > CMP $01 > BNE DONE > INY > BNE ]LP > DEY ; cannot be zero; $FF MAX > > DONE LDA #$00 > STA $C073 > STA $C008 > RTS ; Y-reg returns with # of available banks Out of curiosity, what type of assembler syntax is this in? There are two duplicate labels ]LP (I didn't even know ] was a valid character, especially as the first character) and they aren't followed by colons.
[toc] | [prev] | [next] | [standalone]
| From | Antoine Vignau <antoine.vignau@laposte.net> |
|---|---|
| Date | 2018-02-16 18:43 -0800 |
| Message-ID | <b31be523-8caf-4189-9255-96869c726b6d@googlegroups.com> |
| In reply to | #4234 |
Merlin supports ]
[toc] | [prev] | [next] | [standalone]
| From | Anthony Ortiz <anthonypaulo@gmail.com> |
|---|---|
| Date | 2018-02-16 18:59 -0800 |
| Message-ID | <a231d573-8f71-4adc-bf2a-712b56bf18d1@googlegroups.com> |
| In reply to | #4235 |
On Friday, February 16, 2018 at 9:43:12 PM UTC-5, Antoine Vignau wrote: > Merlin supports ] Good to know, I've gotta try Merlin out.
[toc] | [prev] | [next] | [standalone]
| From | gids.rs@sasktel.net |
|---|---|
| Date | 2018-02-17 00:53 -0800 |
| Message-ID | <27741f7c-f568-4513-aa28-acecf8ed62ce@googlegroups.com> |
| In reply to | #4234 |
On Friday, February 16, 2018 at 8:09:58 PM UTC-6, Anthony Ortiz wrote: > On Friday, February 16, 2018 at 4:23:13 AM UTC-5, gid...@sasktel.net wrote: > > On Thursday, February 15, 2018 at 11:57:36 PM UTC-6, Anthony Ortiz wrote: > > > On Friday, February 16, 2018 at 12:25:27 AM UTC-5, Anthony Ortiz wrote: > > > > On Thursday, February 15, 2018 at 8:48:39 AM UTC-5, Anthony Ortiz wrote: > > > > > Thx Brian, will try it out tonight! > > > > > > > > Works like a charm, many thanks! > > > > > > > > @gid : Given Brian's code, I'm guessing along with the change you suggested of changing BPL to BNE then you need to also change 304 to #$FF in order to count all the banks, right? > > > > > > Actually this code won't work correctly if you set 304 to $FF; code seems to be geared towards 8mb max as you mentioned. > > > > > > Here is my code for 16 Mb > > > > LDY #$00 > > STA $C009 > > > > ]LP STY $C073 > > STY $00 > > TYA > > EOR #$FF > > STA $01 > > DEY > > BNE ]LP > > > > ]LP STY $C073 > > CPY $00 > > BNE DONE > > TYA > > EOR #$FF > > CMP $01 > > BNE DONE > > INY > > BNE ]LP > > DEY ; cannot be zero; $FF MAX > > > > DONE LDA #$00 > > STA $C073 > > STA $C008 > > RTS ; Y-reg returns with # of available banks > > Out of curiosity, what type of assembler syntax is this in? There are two duplicate labels ]LP (I didn't even know ] was a valid character, especially as the first character) and they aren't followed by colons. I use the Ninja Force Assembler.
[toc] | [prev] | [next] | [standalone]
| From | Michael J. Mahon <mjmahon@aol.com> |
|---|---|
| Date | 2018-02-17 09:56 -0600 |
| Message-ID | <kMCdnQlwJJU0zRXHnZ2dnUU7-WnNnZ2d@giganews.com> |
| In reply to | #4234 |
Anthony Ortiz <anthonypaulo@gmail.com> wrote: > On Friday, February 16, 2018 at 4:23:13 AM UTC-5, gid...@sasktel.net wrote: >> On Thursday, February 15, 2018 at 11:57:36 PM UTC-6, Anthony Ortiz wrote: >>> On Friday, February 16, 2018 at 12:25:27 AM UTC-5, Anthony Ortiz wrote: >>>> On Thursday, February 15, 2018 at 8:48:39 AM UTC-5, Anthony Ortiz wrote: >>>>> Thx Brian, will try it out tonight! >>>> >>>> Works like a charm, many thanks! >>>> >>>> @gid : Given Brian's code, I'm guessing along with the change you >>>> suggested of changing BPL to BNE then you need to also change 304 to >>>> #$FF in order to count all the banks, right? >>> >>> Actually this code won't work correctly if you set 304 to $FF; code >>> seems to be geared towards 8mb max as you mentioned. >> >> >> Here is my code for 16 Mb >> >> LDY #$00 >> STA $C009 >> >> ]LP STY $C073 >> STY $00 >> TYA >> EOR #$FF >> STA $01 >> DEY >> BNE ]LP >> >> ]LP STY $C073 >> CPY $00 >> BNE DONE >> TYA >> EOR #$FF >> CMP $01 >> BNE DONE >> INY >> BNE ]LP >> DEY ; cannot be zero; $FF MAX >> >> DONE LDA #$00 >> STA $C073 >> STA $C008 >> RTS ; Y-reg returns with # of available banks > > Out of curiosity, what type of assembler syntax is this in? There are two > duplicate labels ]LP (I didn't even know ] was a valid character, > especially as the first character) and they aren't followed by colons. > It's Merlin source. Merlin supports three types of labels: local labels that begin with a ":" and are defined only in the lines between regular labels, variables that begin with a "]" and can be reused or re-EQUed, and regular labels which are all others and can only be defined once. There is also a special class of variables, "]1" through "]9" that represent both global assembly variables and, within a macro, the macro parameters. -- -michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com
[toc] | [prev] | [next] | [standalone]
| From | James Davis <JPD.Enterprises@outlook.com> |
|---|---|
| Date | 2018-02-15 00:47 -0800 |
| Message-ID | <1b1c1ba5-52a7-489b-8bc1-f11cb4b7aee3@googlegroups.com> |
| In reply to | #4217 |
On Wednesday, February 14, 2018 at 8:26:31 PM UTC-8, Anthony Ortiz wrote: > Does anyone know if this is already conveniently compiled into a dsk image on asimov? If not, what would you recommend I use to compile it? Anthony, It should be assembled, not compiled. Use a 6502 Assembler, like Merlin. Here are some RAMWORKS links: ftp://public.asimov.net/pub/apple_II/images/hardware/storage/memory/RAMWORKS_DOS3.3.dsk ftp://public.asimov.net/pub/apple_II/images/hardware/storage/memory/RAMWORKS_RAMDRIVE.dsk http://ae.applearchives.com/apple_e/ramworks_iii/ramworks_diagnostics.zip It may be part of one of their RAMWORKS diagnostics programs. James Davis
[toc] | [prev] | [next] | [standalone]
| From | Antoine Vignau <antoine.vignau@laposte.net> |
|---|---|
| Date | 2018-02-15 03:00 -0800 |
| Message-ID | <77524e9e-6e04-417a-b800-3bd5681c5ca5@googlegroups.com> |
| In reply to | #4220 |
Not a binary, but a source file (Merlin) in i'm fEDD up @ http://www.brutaldeluxe.fr/products/apple2/imfEDDup/imfEDDup_v2.3.po av
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.apple2.programmer
csiph-web