Merge pull request #6 from digarok/refresh

Refresh
This commit is contained in:
Dagen Brock 2021-03-23 16:38:38 -05:00 committed by GitHub
commit c497b6bc5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 174 additions and 99 deletions

64
.github/workflows/main.yml vendored Normal file
View File

@ -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/install-merlin32-action@v0.1.2
- name: Assemble Source
run: |
merlin32 -V src/mmt.s
- name: Install Cadius
uses: digarok/install-cadius-action@v0.1.2
- 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/upload-release-asset@v1.0.1
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/upload-release-asset@v1.0.1
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/upload-release-asset@v1.0.1
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
.gitignore vendored
View File

@ -1,2 +1,12 @@
.DS_Store .DS_Store
*_Output.txt *_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

BIN
MMT140.po

Binary file not shown.

Binary file not shown.

BIN
MMT800.po

Binary file not shown.

View File

@ -1,6 +1,4 @@
MiniMemoryTester # MiniMemoryTester
# mmt
A program designed to exhaustively test expansion memory on an Apple IIGS. 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") ![Boot up and running a quick test](docs/minimemorytester.gif "Boot up and running a quick test")
@ -8,18 +6,14 @@ A program designed to exhaustively test expansion memory on an Apple IIGS.
# Usage # Usage
There is a full manual here http://goo.gl/NiKJTH There is a full manual here http://goo.gl/NiKJTH
If you just want the program, the latest disk images are # Downloads
Disk images are available on the project releases page.
https://github.com/digarok/MiniMemoryTester/releases
[MMT800.2mg](https://github.com/digarok/mmt/blob/master/MMT800.2mg?raw=true "MMT800.2mg") 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.
[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")
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.
# Build # 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 # SET THESE TOOLS UP ON YOUR SYSTEM AND UPDATE THE PATHS HERE TO BUILD
CADIUS="../tools/Cadius" CADIUS="../tools/Cadius"
@ -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. 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 not shown.

60
make_po.sh Executable file
View File

@ -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

View File

@ -33,69 +33,31 @@ ToLower cmp #"Z"
mx %11 mx %11
ColorizeMenu ColorizeMenu sei
lda #6 XSCANLINE #$6;#$A0 ;lt grey
ldx #$A0 ; lt gray XSCANLINE #$7;#$C0 ;grn
jsr WaitScanline XSCANLINE #$8;#$D0 ;yello
XSCANLINE #$A;#$90 ;orange
lda #7 XSCANLINE #$B;#$10 ;red
ldx #$A0 ; lt gray XSCANLINE #$C;#$30 ;purple
jsr WaitScanline XSCANLINE #$E;#$70 ;blue
XSCANLINE #$F;#$50 ;grey
lda #8 XSCANLINE #$10;#$F0 ;white
ldx #$C0 ; green cli
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
rts rts
* now stores x immediately * I think this still has latent issues with a desync'ed bit 0 (race condition)
WaitScanline XSCANLINE MAC
sta :val+1 ldx #]2
:waitloop lda $c02f
:waitloop ldal $e0c02f
asl asl
ldal $e0c02e lda $c02e
rol rol
:val cmp #$00 :val cmp #]1
bne :waitloop bne :waitloop
stx $c022 stx $c022
rts <<<
VBlankForce VBlankForce
:vbl ldal $00c019 :vbl ldal $00c019
@ -121,7 +83,7 @@ WaitSCB sta :val+1
; horizcnt even/odd right as it changes ; horizcnt even/odd right as it changes
; and start early or something? ; and start early or something?
rts rts
MAXSCB db 0
WaitSome ldy #$07 WaitSome ldy #$07

View File

@ -27,7 +27,7 @@
org $2000 ; start at $2000 (all ProDOS8 system files) org $2000 ; start at $2000 (all ProDOS8 system files)
typ $ff ; set P8 type ($ff = "SYS") for output file 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 put applerom
Init Init
@ -452,15 +452,6 @@ TestLogError PushAll
*Mesg_Error0 asc "Wrote: $00 %12345678 Read: $00 %12345678" *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 TestForceUpdateStatus PushAll
stx _stash stx _stash
@ -595,7 +586,7 @@ TestMemoryLocationTwoPass
bne :UNHANDLED bne :UNHANDLED
jmp Test_16BitWalk1TP jmp Test_16BitWalk1TP
:UNHANDLED sep #$30 :UNHANDLED sep #$30 ; @todo: what is this?
rep #$10 rep #$10
rts rts
@ -774,7 +765,7 @@ BANKPATCH12 = *-1
PushAll PushAll
sep #$20 sep #$20
jsr CORRUPTOR jsr CORRUPTOR ; @todo: inline
clc clc
xce xce
rep #$30 rep #$30
@ -1091,10 +1082,11 @@ TestAdvanceLocation lda TestDirection
:dn lda TestSize16Bit :dn lda TestSize16Bit
beq :dn8 beq :dn8
:dn16 cpx #0 :dn16 cpx #0 ;check if already at 0?
beq :hitBankBoundry beq :hitBankBoundry ;
dex
beq :hitBankBoundry ;how about now?
dex ; dex ;
cpx #0
beq :hitBankBoundryTest ;we still need to test in this case. side effect of odd start/ends beq :hitBankBoundryTest ;we still need to test in this case. side effect of odd start/ends
bra :testStartAddr bra :testStartAddr
:dn8 cpx #0 :dn8 cpx #0
@ -1284,7 +1276,6 @@ TestPatchBanks lda CurBank
rts rts
CORRUPTOR lda $C000 CORRUPTOR lda $C000
bpl _nokey bpl _nokey
and #11101111 and #11101111
@ -1294,8 +1285,7 @@ CORRUPTOR lda $C000
stal $020000,x stal $020000,x
BANKPATCHXX = *-1 BANKPATCHXX = *-1
sta $C010 ; clear it or we can't test WaitOnError sta $C010 ; clear it or we can't test WaitOnError
_nokey nop _nokey rts
rts
mx %11 mx %11
@ -1313,9 +1303,9 @@ TESTSTATE_WRITE = 2
TESTSTATE_BOTH = 3 TESTSTATE_BOTH = 3
UpdateScanInterval equ #$1000 UpdateScanInterval equ #$1000
Mesg_Welcome asc "Mini Memory Tester v1.0.1 - Copyright (c) 2015-2018 Dagen Brock",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 & more!",$8D,$8D 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 asc "Full manual and latest version available at github.com/digarok/mmt",00
Mesg_InternalRam256 asc "Built-In RAM 256K",00 Mesg_InternalRam256 asc "Built-In RAM 256K",00
Mesg_InternalRam1024 asc "Built-In RAM 1024K",00 Mesg_InternalRam1024 asc "Built-In RAM 1024K",00
Mesg_ExpansionRam asc "Expansion RAM ",00 Mesg_ExpansionRam asc "Expansion RAM ",00
@ -1748,7 +1738,7 @@ _clearstring asc " ",$00
MainMenuStrs MainMenuStrs
asc " ______________________________________________________________________________",$8D,$00 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,'ZLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL_',$18,00
asc $1B,'ZZ \GGGGGGGGGGGGG_',"Test Settings",'ZGGGGGGGGGGGGG\ _'," ",'Z \GGGGGGGG_',"Info",'ZGGGGGGGG\ _'," ",'_',$18,00 asc $1B,'ZZ \GGGGGGGGGGGGG_',"Test Settings",'ZGGGGGGGGGGGGG\ _'," ",'Z \GGGGGGGG_',"Info",'ZGGGGGGGG\ _'," ",'_',$18,00
asc $1B,'ZZ'," ",'_'," ",'Z'," ",'_'," ",'_',$18,00 asc $1B,'ZZ'," ",'_'," ",'Z'," ",'_'," ",'_',$18,00