mirror of
https://github.com/mouse6502/mktrashdove.git
synced 2025-01-03 04:33:45 +00:00
quick entry in the 'mktrash' mental contest - for timmi.
this is the trashdove.. it somehow got into the Apple II double lo-res screen.
This commit is contained in:
commit
1423865f6d
1
gvim.sh
Normal file
1
gvim.sh
Normal file
@ -0,0 +1 @@
|
||||
gvim -p main_h.s main.s tables_h.s tables.s gfx80_h.s gfx80.s build.rb linkfile
|
25
linkfile
Normal file
25
linkfile
Normal file
@ -0,0 +1,25 @@
|
||||
*---*
|
||||
* link file
|
||||
*---*
|
||||
|
||||
|
||||
typ $06 ; binary file / fixed address
|
||||
|
||||
*---*
|
||||
* Segment 1 *
|
||||
*---*
|
||||
|
||||
asm mkmail.s
|
||||
sna mkmail_seg
|
||||
|
||||
*--*
|
||||
* Segment 2 *
|
||||
*--*
|
||||
|
||||
;asm gfx.s
|
||||
asm gfx140.s
|
||||
sna gfx140_seg
|
||||
|
||||
asm tables.s
|
||||
sna tables_seg
|
||||
|
120
main.s
Normal file
120
main.s
Normal file
@ -0,0 +1,120 @@
|
||||
; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
;
|
||||
; Template Apple II 6502 Code?
|
||||
;
|
||||
; Could be..Awesome Apple II low-resolution horizontal starfield thingy
|
||||
; ..Or..Trash Dove printer.. Who knows yet?
|
||||
;
|
||||
; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
; Use ezgif.com to convert animated gifs to frames
|
||||
; To convert to a2, use b2d file.bmp DL D
|
||||
|
||||
|
||||
mx %11 ; assemble in 8-bit mode
|
||||
typ $06 ; type binary (for merlin32)
|
||||
org $7000 ; system programs execute at $2000
|
||||
dsk main ; this is the main .system blob
|
||||
; we probably want to relocate to higher ground, to free hgr1
|
||||
|
||||
put main_h ; use our shared header
|
||||
;put gfx40_h ; and the 40 col graphics routines
|
||||
;put tables_h ; use tables_h
|
||||
|
||||
; ====================================================================================================
|
||||
; start of code
|
||||
|
||||
start
|
||||
lda #$A0 ; why do I do this?
|
||||
jsr $C300 ; init 80 column card
|
||||
|
||||
;bit DHRON ; turn double-hires on
|
||||
;bit TEXTOFF ; turn on graphics mode
|
||||
;bit MIXEDON ; use bottom 4 rows as text
|
||||
jsr DL_SetDLRMixMode ; turn on double lo-res
|
||||
|
||||
|
||||
; ====================================================================================================
|
||||
; draw a 80x48 glyph
|
||||
|
||||
draw80x48glyph
|
||||
stz curline ; initialize curline to 0
|
||||
stz startloop+4 ; reset self modifying code
|
||||
stz startloop+1
|
||||
lda #$50
|
||||
sta startloop+2
|
||||
lda #$04
|
||||
sta startloop+5
|
||||
|
||||
start2
|
||||
sta PAGE2ON ; start with aux page
|
||||
start3
|
||||
ldy #$27 ; start copying
|
||||
startloop
|
||||
lda $5000,y ; load from storage
|
||||
sta $0400,y ; save to screen
|
||||
dey
|
||||
bpl startloop
|
||||
|
||||
clc ; always add to address for reading after our copy
|
||||
lda startloop+1
|
||||
adc #$28 ; increase screen pos
|
||||
sta startloop+1
|
||||
lda startloop+2
|
||||
adc #0
|
||||
sta startloop+2
|
||||
|
||||
bit PAGE2 ; is page2 on or off
|
||||
bpl start4 ; we're on main page - done - continue
|
||||
|
||||
sta PAGE2OFF ; not done, switch to main page, reset, copy, continue
|
||||
bra start3 ; and continue loop
|
||||
|
||||
start4
|
||||
inc curline ; both aux and main copied - now increase the current line and continue
|
||||
ldx curline
|
||||
cpx #24 ; 0-23 done?
|
||||
beq startdone
|
||||
|
||||
lda lgr_lo,x ; get new screen row for writing
|
||||
sta startloop+4 ; smc
|
||||
lda lgr_hi,x
|
||||
sta startloop+5
|
||||
|
||||
bra start2
|
||||
|
||||
startdone
|
||||
rts
|
||||
|
||||
curline db 0
|
||||
|
||||
; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
; Lo-Res Screen - 40 by 48. 48 = 24 * 2 colors per byte separated by nybble (TTTT BBBB) - one horiz line represented below
|
||||
; __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
|
||||
; top col, low nyb |__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|
|
||||
; bot col, hi nyb |__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|
|
||||
; offset dec 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
||||
; offset hex 0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27
|
||||
|
||||
; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
; Support Libraries
|
||||
|
||||
; temp insert directly here
|
||||
; put gfx40 ; graphics library
|
||||
put tables ; the tables
|
||||
|
||||
; from Flapple Bird
|
||||
|
||||
DL_SetDLRMixMode
|
||||
;lda LORES
|
||||
lda $C050
|
||||
;lda SETAN3
|
||||
lda $C05E
|
||||
;sta SET80VID
|
||||
sta $C00D
|
||||
;sta C80STOREON
|
||||
sta $C001
|
||||
;sta MIXSET
|
||||
sta $C053
|
||||
rts
|
||||
|
16
main_h.s
Normal file
16
main_h.s
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
ZP0 = $06
|
||||
ZP1 = $07
|
||||
ZP2 = $08
|
||||
ZP3 = $09
|
||||
|
||||
PAGE2 = $C01C ; R7 1=video page2 OR aux video page selected
|
||||
PAGE2OFF = $C054 ; RW select page1 display (or main video memory)
|
||||
PAGE2ON = $C055 ; RW select page2 display (or aux video memory)
|
||||
|
||||
DHRON = $C05E ; enable dhr
|
||||
DHROFF = $C05F ; disable dhr
|
||||
|
||||
TEXTOFF = $C050 ; select graphics mode
|
||||
|
||||
MIXEDON = $C053 ; use graphics with four lines of text
|
59
makedisk.rb
Executable file
59
makedisk.rb
Executable file
@ -0,0 +1,59 @@
|
||||
#!/usr/bin/ruby
|
||||
|
||||
MERLIN = "~/m/Merlin32 -V"
|
||||
MACRO_PATH = "macro"
|
||||
|
||||
#files = [
|
||||
# "bresenham.s"
|
||||
#]
|
||||
|
||||
files = ["linkfile"]
|
||||
|
||||
def star(txt,moretxt)
|
||||
0.upto(2){ |x| puts "*"*80 }
|
||||
0.upto(2){ puts " #{txt} #{txt} #{txt}" }
|
||||
puts
|
||||
0.upto(2){ |x| puts "*"*80 }
|
||||
puts
|
||||
puts moretxt
|
||||
end
|
||||
|
||||
def error
|
||||
star("ERROR","There was an error in the program. Please check the log to see where it has failed.")
|
||||
end
|
||||
|
||||
def success
|
||||
star("SUCCESS","The program has compiled successfully.")
|
||||
end
|
||||
|
||||
def do_cmd(cmd, flags={:errch => true})
|
||||
puts "Executing '#{cmd}'.."
|
||||
puts `#{cmd}`
|
||||
if $?.exitstatus != 0
|
||||
error()
|
||||
exit if flags[:errchk]
|
||||
end
|
||||
|
||||
success()
|
||||
end
|
||||
|
||||
begin
|
||||
#cmd = "#{MERLIN} #{MACRO_PATH} #{files.join(" ")}"
|
||||
#puts "Executing '#{cmd}'.."
|
||||
#puts `#{cmd}`
|
||||
#error() if $?.exitstatus != 0
|
||||
#success()
|
||||
do_cmd("mv -f ./main.dsk main.old.dsk", :errchk=>false)
|
||||
do_cmd("cp ~/m/ProDOS_2_0_3.dsk ./main.dsk")
|
||||
do_cmd("java -jar ~/m/ac-1.3.5.jar -p main.dsk MAIN BIN 0x7000 < main")
|
||||
#do_cmd("java -jar ~/m/ac-1.3.5.jar -p main.dsk TD BIN 0x4FFE < td/TD-640X480.DLO")
|
||||
|
||||
1.upto(9) do |n|
|
||||
do_cmd("java -jar ~/m/ac-1.3.5.jar -p main.dsk TD#{n} BIN 0x4FFE < td/TD-#{n}.DLO")
|
||||
end
|
||||
|
||||
#do_cmd("java -jar ~/m/ac-1.3.5.jar -p main.dsk TD BIN 0x7FE < td/TD1-SM.SLO")
|
||||
#do_cmd("java -jar ../ac/ac-1.3.5.jar -p mkmail.dsk GFX BIN 0x7200 < gfx")
|
||||
#do_cmd("java -jar ~/m/ac-1.3.5.jar -p mkmail.dsk GFX140 BIN 0x7200 < gfx140")
|
||||
#do_cmd("java -jar ~/m/ac-1.3.5.jar -p mkmail.dsk TABLES BIN 0x7C00 < tables")
|
||||
end
|
14
tables.s
Normal file
14
tables.s
Normal file
@ -0,0 +1,14 @@
|
||||
; ====================================================================================================
|
||||
; lgr tables
|
||||
|
||||
lgr_lo ENT
|
||||
hex 00,80,00,80,00,80,00,80
|
||||
hex 28,A8,28,A8,28,A8,28,A8
|
||||
hex 50,D0,50,D0,50,D0,50,D0
|
||||
lgr_hi ENT
|
||||
hex 04,04,05,05,06,06,07,07
|
||||
hex 04,04,05,05,06,06,07,07
|
||||
hex 04,04,05,05,06,06,07,07
|
||||
lgr_colortbl ENT
|
||||
hex 00,11,22,33,44,55,66,77,88,99,AA,BB,CC,DD,EE,FF
|
||||
|
3
tables_h.s
Normal file
3
tables_h.s
Normal file
@ -0,0 +1,3 @@
|
||||
lgr_lo EXT
|
||||
lgr_hi EXT
|
||||
|
Loading…
Reference in New Issue
Block a user