junglejourney

view romcode.oph @ 218:958f6c30e575

Moved the tile and character sprites into the code ROM to see if there is any effect on the game speed.
author David Boddie <david@boddie.org.uk>
date Mon Oct 17 23:05:31 2011 +0200
parents 59f37c9e74e4
children
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 .byte 0, 0, 0
19 jmp service_entry
21 ; ROM type
22 .byte $82 ; 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 service_entry:
44 cmp #4
45 beq service_command
47 service_entry_exit:
48 rts
50 rom_name: .byte "JUNGLECODE", 13
52 service_command:
54 tya ; push Y and X registers onto the stack
55 pha
56 txa
57 pha
59 ldx #0
60 service_command_loop:
62 lda ($f2),y
63 cmp rom_name,x
64 bne service_command_exit
65 inx
66 iny
67 cpx #11
68 bne service_command_loop
70 jsr jungle_code
71 lda #0
72 rts
74 service_command_exit:
75 pla ; pop Y and X registers off the stack
76 tax
77 pla
78 tay
79 lda #4 ; restore A
80 rts
82 jungle_code:
84 .include "mapcode.oph"
86 tile_addresses_low: .byte $80, $E0, $40, $00, $60, $c0, $20
87 tile_addresses_high: .byte $B4, $B4, $B5, $b3, $b3, $b3, $b4
89 player_direction_chars_low: .byte $00,$30,$60,$90,$c0,$f0,$20,$50, $80,$b0,$e0,$10
90 player_direction_chars_high: .byte $a2,$a2,$a2,$a2,$a2,$a2,$a3,$a3, $a3,$a3,$a3,$a4
92 enemy_direction_chars_low: .byte $c0,$00,$40,$80,$c0,$00,$40,$80
93 enemy_direction_chars_high: .byte $a4,$a5,$a5,$a5,$a5,$a6,$a6,$a6
95 emerge_explode_chars_low: .byte $c0,$00,$40,$80,$c0,$00,$40,$80
96 emerge_explode_chars_high: .byte $ae,$af,$af,$af,$af,$b0,$b0,$b0
98 item_chars_low: .byte $c0,$00,$40,$80,$c0,$00,$40,$80,$c0
99 item_chars_high: .byte $b0,$b1,$b1,$b1,$b1,$b2,$b2,$b2,$b2
101 projectile_chars_low: .byte $40,$50,$60,$70,$80,$90,$a0,$b0
102 .alias projectile_chars_high $a4