junglejourney

view romcode.oph @ 216:cdceac4f5ea8

Started working on a ROM-based version of the game. Removed a generated file.
author David Boddie <david@boddie.org.uk>
date Sun Oct 16 18:25:22 2011 +0200
parents
children 59f37c9e74e4
line source
1 ; Copyright (C) 2011 David Boddie <david@boddie.org.uk>
2 ;
3 ; This program is free software: you can redistribute it and/or modify
4 ; it under the terms of the GNU General Public License as published by
5 ; the Free Software Foundation, either version 3 of the License, or
6 ; (at your option) any later version.
7 ;
8 ; This program is distributed in the hope that it will be useful,
9 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ; GNU General Public License for more details.
12 ;
13 ; You should have received a copy of the GNU General Public License
14 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
16 .org $8000
17 rom_start:
18 jmp language_entry
19 jmp service_entry
21 ; ROM type
22 .byte $c2 ; 6502 code (2), language ($40), service ($80)
24 copyright_offset:
25 .byte [copyright_string - rom_start - 1]
27 ; Version
28 .byte 1
30 ; Title string
31 .byte "Jungle Journey (code)", 0
33 ; Version string
34 .byte "1.0", 0
36 copyright_string:
37 .byte "(C) 2011 David Boddie", 0
39 ; Second processor relocation address
40 .byte 0, $80, 0, 0
42 language_entry:
44 jmp jungle_code
46 service_entry:
48 cmp #4
49 beq service_command
51 service_entry_exit:
52 rts
54 rom_name: .byte "JUNGLECODE"
56 service_command:
58 tya ; push Y and X registers onto the stack
59 pha
60 txa
61 pha
63 ldx #0
64 service_command_loop:
66 lda ($f2),y
67 cmp rom_name,x
68 bne service_command_exit
69 inx
70 iny
71 cpx #10
72 bne service_command_loop
74 jsr jungle_code
75 lda #0
76 rts
78 service_command_exit:
79 pla ; pop Y and X registers off the stack
80 tax
81 pha
82 tay
83 lda #4 ; restore A
84 rts
86 jungle_code:
88 .include "mapcode.oph"
90 tile_addresses_low: .byte $00, $60, $c0, $00, $60, $c0, $20
91 tile_addresses_high: .byte $54, $54, $54, $50, $50, $50, $51
93 player_direction_chars_low: .byte $00,$30,$60,$90,$c0,$f0,$20,$50, $80,$b0,$e0,$10
94 player_direction_chars_high: .byte $3f,$3f,$3f,$3f,$3f,$3f,$40,$40, $40,$40,$40,$41
96 enemy_direction_chars_low: .byte $c0,$00,$40,$80,$c0,$00,$40,$80
97 enemy_direction_chars_high: .byte $41,$42,$42,$42,$42,$43,$43,$43
99 emerge_explode_chars_low: .byte $c0,$00,$40,$80,$c0,$00,$40,$80
100 emerge_explode_chars_high: .byte $4b,$4c,$4c,$4c,$4c,$4d,$4d,$4d
102 item_chars_low: .byte $c0,$00,$40,$80,$c0,$00,$40,$80,$c0
103 item_chars_high: .byte $4d,$4e,$4e,$4e,$4e,$4f,$4f,$4f,$4f
105 projectile_chars_low: .byte $40,$50,$60,$70,$80,$90,$a0,$b0
106 .alias projectile_chars_high $41