Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/coolboy-multirom-builder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2020-09-17 19:48:27 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2020-09-17 19:48:27 +0300
commitb03de3e3eaf063dce942de66bbb3ebef21619a38 (patch)
tree82d3000b6841209c285ea8c9e0df74a544719cb1 /misc.asm
parentb3c6426a170f0b1912eecc5ca342fec4deb9d90b (diff)
Spaces
Diffstat (limited to 'misc.asm')
-rw-r--r--misc.asm104
1 files changed, 52 insertions, 52 deletions
diff --git a/misc.asm b/misc.asm
index 1ebaf32..e13efac 100644
--- a/misc.asm
+++ b/misc.asm
@@ -3,64 +3,64 @@ RANDOM_TEMP .rs 1 ; temporary variable for random
CONSOLE_TYPE .rs 1 ; console type
random_init:
- lda #$5A
- sta <RANDOM_TEMP
- lda %10011101
- sta <RANDOM
- lda %01011011
- sta <RANDOM+1
- rts
-
+ lda #$5A
+ sta <RANDOM_TEMP
+ lda %10011101
+ sta <RANDOM
+ lda %01011011
+ sta <RANDOM+1
+ rts
+
random:
- lda <RANDOM+1
- sta <RANDOM_TEMP
- lda <RANDOM
- asl a
- rol <RANDOM_TEMP
- asl a
- rol <RANDOM_TEMP
- clc
- adc <RANDOM
- pha
- lda <RANDOM_TEMP
- adc <RANDOM+1
- sta <RANDOM+1
- pla
- adc #$11
- sta <RANDOM
- lda <RANDOM+1
- adc #$36
- sta <RANDOM+1
- rts
+ lda <RANDOM+1
+ sta <RANDOM_TEMP
+ lda <RANDOM
+ asl a
+ rol <RANDOM_TEMP
+ asl a
+ rol <RANDOM_TEMP
+ clc
+ adc <RANDOM
+ pha
+ lda <RANDOM_TEMP
+ adc <RANDOM+1
+ sta <RANDOM+1
+ pla
+ adc #$11
+ sta <RANDOM
+ lda <RANDOM+1
+ adc #$36
+ sta <RANDOM+1
+ rts
console_detect:
jsr waitblank_simple
- ldx #0
- ldy #0
- ; Console type detect
+ ldx #0
+ ldy #0
+ ; Console type detect
.detect_l:
- inx
- bne .detect_s
- iny
-.detect_s:
- lda $2002
- bpl .detect_l
- lda #$00
- cpy #$08
- bne .not_ntsc1
- ora #$01
+ inx
+ bne .detect_s
+ iny
+.detect_s:
+ lda $2002
+ bpl .detect_l
+ lda #$00
+ cpy #$08
+ bne .not_ntsc1
+ ora #$01
.not_ntsc1:
- cpy #$09
- bne .not_ntsc2
- ora #$01
+ cpy #$09
+ bne .not_ntsc2
+ ora #$01
.not_ntsc2:
- cpy #$0A
- bne .not_pal
- ora #$02
+ cpy #$0A
+ bne .not_pal
+ ora #$02
.not_pal:
- cpy #$0B
- bne .not_dendy
- ora #$04
+ cpy #$0B
+ bne .not_dendy
+ ora #$04
.not_dendy:
- sta <CONSOLE_TYPE
- rts
+ sta <CONSOLE_TYPE
+ rts