dos33fsprogs/games/peasant/copy_check.s

137 lines
2.2 KiB
ArmAsm
Raw Normal View History

; Fake copy protection check
; As Strongbad Actual pointed out, this is anachronistic
; though if that's what you're worried about maybe you
; shouldn't be playing Peasant's Quest
2021-08-11 23:29:47 +00:00
; o/~ Bread is a good time for me o/~
2021-08-12 02:16:15 +00:00
; by Vince `deater` Weaver vince@deater.net
.include "hardware.inc"
.include "zp.inc"
2021-08-11 23:29:47 +00:00
;************************
; Ending
;************************
2021-08-12 02:16:15 +00:00
copy_check:
2021-08-12 02:16:15 +00:00
jsr hgr_make_tables
jsr HGR2 ; Hi-res graphics, no text at bottom
; Y=0, A=0 after this called
trogdor_question:
2021-08-11 23:29:47 +00:00
lda #<(trogdor_lzsa)
sta getsrc_smc+1
lda #>(trogdor_lzsa)
sta getsrc_smc+2
lda #$40
jsr decompress_lzsa2_fast
2021-08-12 03:53:49 +00:00
lda #<copy_protection_text
sta OUTL
lda #>copy_protection_text
sta OUTH
jsr hgr_put_string
jsr hgr_put_string
jsr hgr_put_string
jsr hgr_input
2021-08-12 04:54:04 +00:00
;=============================
; draw WRONG! box
;=============================
lda #0
sta BOX_X1H
lda #97
sta BOX_X1L
lda #69
sta BOX_Y1
lda #0
sta BOX_X2H
lda #184
sta BOX_X2L
lda #109
sta BOX_Y2
jsr draw_box
; print WRONG! at 16, 84
lda #<wrong_text
sta OUTL
lda #>wrong_text
sta OUTH
jsr hgr_put_string
jsr wait_until_keypress
2021-08-12 03:53:49 +00:00
;=============================
; game over man
;=============================
2021-08-11 23:29:47 +00:00
2021-08-12 02:16:15 +00:00
game_over:
2021-08-11 23:29:47 +00:00
lda #<(game_over_lzsa)
sta getsrc_smc+1
lda #>(game_over_lzsa)
sta getsrc_smc+2
lda #$40
jsr decompress_lzsa2_fast
lda #<peasant_text
sta OUTL
lda #>peasant_text
sta OUTH
jsr hgr_put_string
2021-08-12 02:16:15 +00:00
jsr hgr_put_string
2021-08-11 23:29:47 +00:00
jsr wait_until_keypress
2021-08-12 02:16:15 +00:00
forever:
jmp forever
.include "decompress_fast_v2.s"
.include "wait_keypress.s"
.include "hgr_font.s"
.include "draw_box.s"
.include "hgr_rectangle.s"
2021-08-12 03:53:49 +00:00
.include "hgr_input.s"
.include "hgr_tables.s"
2021-08-11 23:29:47 +00:00
.include "graphics_copy/copy_graphics.inc"
2021-08-11 23:29:47 +00:00
2021-08-12 02:16:15 +00:00
peasant_text:
.byte 25,2,"Peasant's Quest",0
2021-08-11 23:29:47 +00:00
2021-08-12 02:16:15 +00:00
score_text:
.byte 0,2,"Score: 0 of 150",0
2021-08-12 03:53:49 +00:00
2021-08-12 04:54:04 +00:00
wrong_text:
.byte 16,84,"WRONG!!!",0
2021-08-12 03:53:49 +00:00
; 0123456789012345678901234567890123456789
copy_protection_text:
.byte 0,160,"Before proceeding, don thy red glasses",0
.byte 0,168,"spin the wheel on p27 and answer this:",0
.byte 0,176,"+ Who is Trogdor's cousin's brother?",0