Skip to content

Commit

Permalink
Merge pull request #6 from digarok/refresh
Browse files Browse the repository at this point in the history
Refresh
  • Loading branch information
digarok authored Mar 23, 2021
2 parents 41e3d52 + dc531d4 commit c497b6b
Show file tree
Hide file tree
Showing 10 changed files with 174 additions and 99 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
on: [push]

jobs:
cicd_pipeline:
runs-on: ubuntu-latest
name: Run assembly and disk image CICD pipeline
steps:
# CHECKOUT AND ASSEMBLE ON EVERY PUSH, ANY BRANCH
- uses: actions/checkout@v2
- name: Install Merlin
uses: digarok/[email protected]

- name: Assemble Source
run: |
merlin32 -V src/mmt.s
- name: Install Cadius
uses: digarok/[email protected]

- name: Make Bootable ProDOS Image
if: startsWith(github.ref, 'refs/tags/v')
run: ./make_po.sh

# EVERYTHING BELOW IS ONLY WHEN VERSION TAGS PUSHED (i.e. tag like "v0.1")
- name: Create Release
id: create_release
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}

- name: Upload Release Asset - 140KB ProDOS Image
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./MMT140.po
asset_name: MMT140.po
asset_content_type: application/octet-stream
- name: Upload Release Asset - 800KB ProDOS Image (.po)
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./MMT800.po
asset_name: MMT800.po
asset_content_type: application/octet-stream
- name: Upload Release Asset - 800KB ProDOS Image (.2mg)
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./MMT800.2mg
asset_name: MMT800.2mg
asset_content_type: application/octet-stream
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
.DS_Store
*_Output.txt

# Don't commit disk images. They are built on releases page now.
MMT*.po
MMT*.2mg

# Don't commit builds.
src/mmt.system

# Don't commit ProDOS (should be a symlink)
PRODOS.2.4.2
Binary file removed MMT140.po
Binary file not shown.
Binary file removed MMT800.2mg
Binary file not shown.
Binary file removed MMT800.po
Binary file not shown.
27 changes: 8 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
MiniMemoryTester

# mmt
# MiniMemoryTester
A program designed to exhaustively test expansion memory on an Apple IIGS.

![Boot up and running a quick test](docs/minimemorytester.gif "Boot up and running a quick test")

# Usage
There is a full manual here http://goo.gl/NiKJTH

If you just want the program, the latest disk images are

[MMT800.2mg](https://github.com/digarok/mmt/blob/master/MMT800.2mg?raw=true "MMT800.2mg")

[MMT800.po](https://github.com/digarok/mmt/blob/master/MMT800.po?raw=true "MMT800.po")

[MMT140.po](https://github.com/digarok/mmt/blob/master/MMT140.po?raw=true "MMT140.po")
# Downloads
Disk images are available on the project releases page.
https://github.com/digarok/MiniMemoryTester/releases

You can transfer those to a 3.5" or 5.25" disk using ADT Pro or if you have a SD based storage system, it should run fine from there.
You can transfer them to a 3.5" or 5.25" disk using ADT Pro or you can run it from your modern SD storage systems.

# Build
You can build it yourself using the *make_bootable* Bash script under Linux or OSX. It should be trivial to write an approximate BAT or Powershell for Windows, if that is what you are using. Note - You need to edit the following lines in the *make_bootable* script:
You can build it yourself using the *`make_po.sh`* Bash script under Linux or OSX. It should be trivial to write an approximate BAT or Powershell for Windows, if that is what you are using. Note - You need to edit the following lines in the *make_bootable* script:

# SET THESE TOOLS UP ON YOUR SYSTEM AND UPDATE THE PATHS HERE TO BUILD
CADIUS="../tools/Cadius"
Expand Down Expand Up @@ -52,11 +46,6 @@ Large portions of this program are written in one of the two cpu modes:

The 8-bit test modes, in particular, are written with a short accumulator, but long index registers. This way it can easily scan a bank of memory using the X register from 0000 to FFFF. Likewise, when running 16-bit test modes, we write 16 bit values using a long accumulator, and still using long index registers. However, we also increment or decrement by two, since it writes two bytes at a time with a long accumulator.

`TestInit` function is where the "BEGIN TEST" code starts.


Again, see the manual at the top for the full description of the software and usage.





Again, see the manual at the top for the full description of the software and usage.
Binary file modified docs/MiniMemoryTest.pdf
Binary file not shown.
60 changes: 60 additions & 0 deletions make_po.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/bin/bash
command -v cadius >/dev/null 2>&1 || { echo "I require CADIUS but it's not installed. Aborting." >&2; exit 1; }


SRCFILES=(`ls src/*.s`)
SYSFILES=(`ls PRODOS.2.4.2//PRODOS src/*system`)
SRCDIR=src
BLDDIR=build/

DISK="MMT"
CADIUS="cadius"

if [ ! -d $BLDDIR ] ; then
echo "Build directory for this platform doesn't exist so I will create it."
mkdir -p $BLDDIR ; echo "Created: $BLDDIR"
fi

# need to autogen
cp src/_FileInformation.txt $BLDDIR

echo "Creating disk images"
$CADIUS createvolume ${DISK}800.2mg ${DISK}800 800KB >/dev/null
$CADIUS createvolume ${DISK}800.po ${DISK}800 800KB >/dev/null
$CADIUS createvolume ${DISK}140.po ${DISK}140 140KB >/dev/null

#SYSTEM FILES
echo -n "Processing System files: "
COMMA=""
for f in ${SYSFILES[@]};
do
FNAME=${f##*/}
echo -n "$COMMA $FNAME"
cp $f $BLDDIR/$FNAME
$CADIUS addfile ${DISK}800.2mg /${DISK}800/ $BLDDIR/$FNAME >/dev/null
$CADIUS addfile ${DISK}800.po /${DISK}800/ $BLDDIR/$FNAME >/dev/null
$CADIUS addfile ${DISK}140.po /${DISK}140/ $BLDDIR/$FNAME >/dev/null
COMMA=","
done

#SOURCE FILES
echo ""
echo -n "Processing Source files: "
COMMA=""
for f in ${SRCFILES[@]};
do
FNAME=${f##*/}
echo -n "$COMMA $FNAME"
cp $f $BLDDIR/$FNAME
echo "$FNAME=Type(04),AuxType(0000),VersionCreate(24),MinVersion(00),Access(E3)" > $BLDDIR/_FileInformation.txt
$CADIUS sethighbit $BLDDIR/$FNAME >/dev/null
$CADIUS addfile ${DISK}800.2mg /${DISK}800/ $BLDDIR/$FNAME >/dev/null
$CADIUS addfile ${DISK}800.po /${DISK}800/ $BLDDIR/$FNAME >/dev/null
$CADIUS addfile ${DISK}140.po /${DISK}140/ $BLDDIR/$FNAME >/dev/null
COMMA=","
done


echo "Look, I'm no expert, but I think everything went pretty well. (BUILD SUCCEEDED!!!)"
echo ""
exit
78 changes: 20 additions & 58 deletions src/misc.s
Original file line number Diff line number Diff line change
Expand Up @@ -33,69 +33,31 @@ ToLower cmp #"Z"


mx %11
ColorizeMenu
lda #6
ldx #$A0 ; lt gray
jsr WaitScanline

lda #7
ldx #$A0 ; lt gray
jsr WaitScanline

lda #8
ldx #$C0 ; green
jsr WaitScanline

lda #9
ldx #$C0 ; green
jsr WaitScanline

lda #10
ldx #$C0 ; green
jsr WaitScanline

lda #11
ldx #$d0 ; yello
jsr WaitScanline

lda #12
ldx #$90 ; orange
jsr WaitScanline

lda #13
ldx #$10 ; red
jsr WaitScanline

lda #14
ldx #$30 ; purple
jsr WaitScanline


lda #15
ldx #$70 ; bblue
jsr WaitScanline

lda #16
ldx #$50 ; grey
jsr WaitScanline

lda #17
ldx #$f0 ; white
jsr WaitScanline
ColorizeMenu sei
XSCANLINE #$6;#$A0 ;lt grey
XSCANLINE #$7;#$C0 ;grn
XSCANLINE #$8;#$D0 ;yello
XSCANLINE #$A;#$90 ;orange
XSCANLINE #$B;#$10 ;red
XSCANLINE #$C;#$30 ;purple
XSCANLINE #$E;#$70 ;blue
XSCANLINE #$F;#$50 ;grey
XSCANLINE #$10;#$F0 ;white
cli
rts

* now stores x immediately
WaitScanline
sta :val+1

:waitloop ldal $e0c02f
* I think this still has latent issues with a desync'ed bit 0 (race condition)
XSCANLINE MAC
ldx #]2
:waitloop lda $c02f
asl
ldal $e0c02e
lda $c02e
rol
:val cmp #$00
:val cmp #]1
bne :waitloop
stx $c022
rts
<<<


VBlankForce
:vbl ldal $00c019
Expand All @@ -121,7 +83,7 @@ WaitSCB sta :val+1
; horizcnt even/odd right as it changes
; and start early or something?
rts
MAXSCB db 0



WaitSome ldy #$07
Expand Down
34 changes: 12 additions & 22 deletions src/mmt.s
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

org $2000 ; start at $2000 (all ProDOS8 system files)
typ $ff ; set P8 type ($ff = "SYS") for output file
dsk mmtsystem ; tell compiler what name for output file
dsk mmt.system ; tell compiler what name for output file
put applerom

Init
Expand Down Expand Up @@ -452,15 +452,6 @@ TestLogError PushAll
*Mesg_Error0 asc "Wrote: $00 %12345678 Read: $00 %12345678"


TestRollBack
lda TestDirection
eor #$01
sta TestDirection
jsr TestAdvanceLocation
lda TestDirection
eor #$01
sta TestDirection
rts

TestForceUpdateStatus PushAll
stx _stash
Expand Down Expand Up @@ -595,7 +586,7 @@ TestMemoryLocationTwoPass
bne :UNHANDLED
jmp Test_16BitWalk1TP

:UNHANDLED sep #$30
:UNHANDLED sep #$30 ; @todo: what is this?
rep #$10

rts
Expand Down Expand Up @@ -774,7 +765,7 @@ BANKPATCH12 = *-1

PushAll
sep #$20
jsr CORRUPTOR
jsr CORRUPTOR ; @todo: inline
clc
xce
rep #$30
Expand Down Expand Up @@ -1091,10 +1082,11 @@ TestAdvanceLocation lda TestDirection

:dn lda TestSize16Bit
beq :dn8
:dn16 cpx #0
beq :hitBankBoundry
:dn16 cpx #0 ;check if already at 0?
beq :hitBankBoundry ;
dex
beq :hitBankBoundry ;how about now?
dex ;
cpx #0
beq :hitBankBoundryTest ;we still need to test in this case. side effect of odd start/ends
bra :testStartAddr
:dn8 cpx #0
Expand Down Expand Up @@ -1284,7 +1276,6 @@ TestPatchBanks lda CurBank

rts


CORRUPTOR lda $C000
bpl _nokey
and #11101111
Expand All @@ -1294,8 +1285,7 @@ CORRUPTOR lda $C000
stal $020000,x
BANKPATCHXX = *-1
sta $C010 ; clear it or we can't test WaitOnError
_nokey nop
rts
_nokey rts
mx %11


Expand All @@ -1313,9 +1303,9 @@ TESTSTATE_WRITE = 2
TESTSTATE_BOTH = 3
UpdateScanInterval equ #$1000

Mesg_Welcome asc "Mini Memory Tester v1.0.1 - Copyright (c) 2015-2018 Dagen Brock",00
Mesg_Promo asc "Visit ReactiveMicro.com & UltimateApple2.com for Apple II RAM cards & more!",$8D,$8D
asc " Full manual and latest version available at github.com/digarok/mmt",00
Mesg_Welcome asc "Mini Memory Tester v1.0.2 - Copyright (c) 2015-2021 Dagen Brock",00
Mesg_Promo asc "Visit ReactiveMicro.com & UltimateApple2.com for Apple II RAM cards & hw.",$8D,$8D
asc "Full manual and latest version available at github.com/digarok/mmt",00
Mesg_InternalRam256 asc "Built-In RAM 256K",00
Mesg_InternalRam1024 asc "Built-In RAM 1024K",00
Mesg_ExpansionRam asc "Expansion RAM ",00
Expand Down Expand Up @@ -1748,7 +1738,7 @@ _clearstring asc " ",$00

MainMenuStrs
asc " ______________________________________________________________________________",$8D,$00
asc $1B,'ZV_@ZVWVWVWV_',"Mini Memory Tester v1.0.1",'ZVWVWVWVWVWVWVWVWV_'," // Infinitum ",'ZWVWVWVW_',$18,$00
asc $1B,'ZV_@ZVWVWVWV_',"Mini Memory Tester v1.0.2",'ZVWVWVWVWVWVWVWVWV_'," // Infinitum ",'ZWVWVWVW_',$18,$00
asc $1B,'ZLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL_',$18,00
asc $1B,'ZZ \GGGGGGGGGGGGG_',"Test Settings",'ZGGGGGGGGGGGGG\ _'," ",'Z \GGGGGGGG_',"Info",'ZGGGGGGGG\ _'," ",'_',$18,00
asc $1B,'ZZ'," ",'_'," ",'Z'," ",'_'," ",'_',$18,00
Expand Down

0 comments on commit c497b6b

Please sign in to comment.