Author Topic: How to "binary" code?  (Read 2547 times)

how2Binary?
 
i wanna make a platformer roleplaying game with quests &  such.

anyone wanna help?

you don't need to know binary code to make a simple platformer.

you don't need to know binary code to make a simple platformer.

you need machine code.......

>name is bing
>avatar is bing
>doesn't use bing


can't tell if troll or just uneducated

i thought you guys were trustworthy enough to help a bro out

trying to make game out of binary
LOL NOPE

i thought you guys were trustworthy enough to help a bro out
http://love2d.org/

there

now go away

hav some actionscript coed

Code: [Select]
onClipEvent(enterFrame){
_x+=speed
if(Key.isDown(65)){
speed-=1.5
}
if(Key.isDown(68)){
speed+=1.5
}
speed-=speed/2
if(speed>1 || speed<0-1){
speed=0
}
if(speed>10){
speed=10
}if(speed<0-10){
speed=0-10
}
}

there now you can make a platformer game like SONIC

Code: [Select]
01101001 01100011 00101000 00101001 00001101 00001010 01111011 00001101 00001010 01100111 01101111 01101111 01100111 01101100 01100101 00101110 01110011 01100101 01100001 01110010 01100011 01101000 00101000 00100010 01101101 01100001 01101011 01100101 00100000 01100111 01100001 01101101 01100101 01110011 00100000 01100110 01110010 01100101 01100101 00100010 00101001 00111011 00001101 00001010 01111101 00001101 00001010 00001101 00001010 01101100 01101111 01100111 01101001 01100011 00101000 00101001 00111011Here is all the binary code you need to make a program.
Hint hint: Translate it.

http://love2d.org/

there

now go away
i want to make a major production, i need a grafics guy, a story guy etc

Don't listen to these scrubs. I made a playable version of Donkey Kong in binary. It's too long to post the full code in one post though  :cookieMonster:

Quote
   AREA interrupts, CODE, READWRITE
   EXPORT lab7
   EXPORT FIQ_Handler
   EXPORT digits_SET
   EXPORT message4
   EXPORT line00
   EXPORT line01
   EXPORT line02
   EXPORT line03
      EXPORT line04
      EXPORT line05
   EXPORT line06
   EXPORT line07
   EXPORT line08
   EXPORT line09
   EXPORT line10
   EXPORT line11
   EXPORT line12
   EXPORT line13
   EXPORT line14
   EXPORT line15
   EXPORT line16
   EXPORT line17
   EXPORT line18
   EXPORT line19
   EXPORT line20
   EXPORT line21
   EXPORT line22
   EXPORT line23
   EXTERN next_level
   EXTERN uart_init
   EXTERN interrupt_init
   EXTERN paint_box
   EXTERN start_timer
   EXTERN disable_timer
   EXTERN read_character
   EXTERN display_digit
   EXTERN LEDs
   EXTERN retry
   EXTERN output_string
   EXTERN disable_timer
   EXTERN start_timer

digits_SET   DCD 0x00001F80  ; 0
          DCD 0x00000300  ; 1
         DCD 0x00002D80   ; 2
         DCD 0x00002780   ; 3
         DCD 0x00003300   ; 4
         DCD 0x00003680   ; 5
         DCD 0x00003E80   ; 6
         DCD 0x00000380   ; 7
         DCD 0x00003F80   ; 8                                                                                                                                                                                                                                                                                                                  
         DCD 0x00003780   ; 9
         DCD 0x00003B80   ; A
         DCD 0x00003E00   ; B
         DCD 0x00002C00   ; C
         DCD 0x00002F00   ; D
         DCD 0x00003C80   ; E
         DCD 0x00003880  ; F

line00 = 0xC, 0xD
line01 = "|  SCORE:00000 |",0xA,0xD,0
line02 = "|==============|",0xA,0xD,0
line03 = "|              |",0xA,0xD,0
line04 = "|   ^          |",0xA,0xD,0
line05 = "|   XXXH       |",0xA,0xD,0
line06 = "|      H       |",0xA,0xD,0
line07 = "|&@    H       |",0xA,0xD,0
line08 = "|ZZZZZZZ#ZZZH  |",0xA,0xD,0
line09 = "|           H  |",0xA,0xD,0
line10 = "|           H  |",0xA,0xD,0
line11 = "|  XXHXXXXXXXXX|",0xA,0xD,0
line12 = "|    H         |",0xA,0xD,0
line13 = "|  @ H         |",0xA,0xD,0
line14 = "|Z#ZZZZZZZZHZ  |",0xA,0xD,0
line15 = "|          H   |",0xA,0xD,0
line16 = "|          H   |",0xA,0xD,0
line17 = "|  HXXXXXXXXXXX|",0xA,0xD,0
line18 = "|  H           |",0xA,0xD,0
line19 = "| @H           |",0xA,0xD,0
line20 = "|ZZZZZZZZZZZH  |",0xA,0xD,0
line21 = "|           H  |",0xA,0xD,0
line22 = "|+          H  |",0xA,0xD,0
line23 = "|XXXXXXXXXXXXXX]",0xA,0xD,0
message1 = "You died! Good Job.",0xA,0xD,0
message2 = "Press F to continue.",0xA,0xD,0
message3 = "Welcome to Donkey Kong!",0xA,0xD,"-",0xA,0xD,"The mischievous ape Donkey Kong has kidnapped the princess and is holding her hostage at the top of the construction site!",0xA,0xD,"Mario must climb to the top and rescue the princess from the ape's grasp, avoiding any rolling barrels and dangerous falls along the way.",0xA,0xD,"-",0xA,0xD,"Rules:",0xA,0xD,"The objective is to reach the princess at the top of the level.",0xA,0xD,"You begin the game with four lives. Once all lives are exhausted the game ends.",0xA,0xD,"You lose a life by touching a barrel, touching Donkey Kong, falling off a ladder, or falling from a ledge.",0xA,0xD,"Every time you reach the princess the level is increased (up to a maximum of 15).",0xA,0xD,"Successfully jumping over a barrel results in a score of (5 * Current Level) being added to your total.",0xA,0xD,"Completing a level gives you a score bonus of (100 * Current Level).",0xA,0xD,"For every 1000 points you score an extra life will be granted (max of 4).",0xA,0xD,"-",0xA,0xD,"Controls:",0xA,0xD,"A - Move left",0xA,0xD,"D - Move right",0xA,0xD,"W - Climb up ladder",0xA,0xD,"S - Climb down ladder",0xA,0xD,"Q - Jump left",0xA,0xD,"E - Jump right",0xA,0xD,"External Button - Toggle game pause",0xA,0xD,"-",0xA,0xD,"Press F to begin the game!",0xA,0xD,0
message4 = "Welp, you rescued the princess on this level, but unfortunately the code to advance level doesn't exist! Reset and try again.",0xA,0xD,0
      ALIGN

   
lab7       
   STMFD sp!, {lr}
   ; Constant Values:
   ; r0: Data inputs/outputs
   ; r1:
   ; r2:
   ; r3: Mario's position
   ; r4: Level counter
   ; r5: Barrel generator time
   ; r6: Barrel movement speed
   ; r7: Mario jump y/n


   LDR r1, =0xE0028008         ; Directs GPIO P1.20-23 for life indicator LEDs
   MOV r0, #0x00000001
   STR r0, [r1]

   BL uart_init      ; Enable UART0 at baud rate of 115200



   LDR r1, =message3
   LDRB r0, [r1]
   BL output_string
start_game   
   BL read_character
   CMP r0, #0x66
   BNE start_game   ; Load directions and wait for game to start.

   BL interrupt_init    ; Enable interrupts

   MOV r0, #0xF      ; Turns on LEDs for 4 starting lives.
   BL LEDs
   MOV r4, #0x1
   MOV r0, r4
   BL display_digit   ; Start at level 1

   BL paint_box
   LDR r3, =line22      ;Mario's initial location. DO NOT USE r3 FOR ANYTHING ELSE.
   ADD r3, r3, #1      ;Mario starts at starting memory address of line22 + 1.
   
   LDR r6, =0x008CA000   ; Initial barrel speeds.
   LSR r6, r6, #1
   BL start_timer

loopy
   CMP r0, r0                                                   ;
   B loopy           ;Endless loop waiting for interrupts


FIQ_Handler
      STMFD SP!, {r0-r2, r8-r12, lr}   ; Save registers

UART0
      ; Check for UART0 interrupt
      LDR r2, =0xE000C008
      LDR r1, [r2]
      TST r1, #0x00000001
      BNE   Timer

      STMFD SP!, {r0-r2, r8-r12, lr}   ; Save registers
         
      ;UART Interrupt Code
      ; r3 = Mario location in memory
      ; a = move left, d = move right, w = climb ladder, s = Descend ladder, q = jump left, e = jump right

mario_move
      
      
Random
      ; Decides if a barrel goes down a ladder based on user movement.
      MOV r9, r3
      ADD r9, r9, LSL #23
      MOV r8, r9
      AND r8, r8, #1

      BL read_character
      CMP r0, #0x61  ;a?
      BEQ move_left      

      CMP r0, #0x64   ;d?
      BEQ move_right

      CMP r0, #0x77   ;w?
      BEQ climb

      CMP r0, #0x73   ;s?
      BEQ descend

      CMP r0, #0x71   ;q?
      BEQ jump_left

      CMP r0, #0x65   ;e?
      BEQ jump_right

      B FIQ_Exit

move_left
      ; Grabs Mario's location in memory from r3 and will shift him left one spot immediately if the space left is a valid space.

      LDRB r1, [r3,#-1]
      CMP r1, #0x40    ; Did mario move into batrrrsadL?
      BEQ death_handler

      LDRB r1, [r3,#-1]
      CMP r1, #0x5E    ; Did mario forget the princess?
      BEQ next_level


      LDRB r1, [r3,#1] ; This block checks if Mario is next to an X or Z.
      CMP r1, #0x58    ; If so he is on a ladder and cannot move horizontally
      BEQ FIQ_Exit    ; so the interrupt is exited.
      CMP r1, #0x5A
      BEQ FIQ_Exit
      LDRB r1, [r3,#-1]
      CMP r1, #0x58     
      BEQ FIQ_Exit
      CMP r1, #0x5A
      BEQ FIQ_Exit

      LDRB r1, [r3,#-1] ; Character left one space of mario
      CMP r1, #0x7C     ; Checks if space to left is a wall (|).
      BEQ FIQ_Exit     ; If so, do not move.
      MOV r1, #0x20      ;   Clears out current space
      STRB r1, [r3]
      SUB r3, r3, #1     ; Updates Mario's location one space to left
      MOV r1, #0x2B     ; Stores Mario (+) into new location
      STRB r1, [r3]

      LDRB r1, [r3, #19] ; Checks if Mario is now under a space. This means he fell
      CMP r1, #0x20      ; off a ledge and died.
      BEQ death_handler

      BL MARIO_LADDER_REPAIR   ; Fix any ladders cleared out before redrawing screen.
      BL paint_box
      B FIQ_Exit

move_right
      LDRB r1, [r3,#1]
      CMP r1, #0x40    ; Did mario move into batrrrsadL?
      BEQ death_handler

      LDRB r1, [r3,#1]   ; This block checks if Mario is next to an X or Z.
      CMP r1, #0x58      ; If so he is on a ladder and cannot move horizontally
      BEQ FIQ_Exit      ; so the interrupt is exited.
      CMP r1, #0x5A
      BEQ FIQ_Exit
      LDRB r1, [r3,#-1]
      CMP r1, #0x58
      BEQ FIQ_Exit
      CMP r1, #0x5A
      BEQ FIQ_Exit

       LDRB r1, [r3,#1]   ; Same as left movement code but adapted for right movement.
      CMP r1, #0x7C
      BEQ FIQ_Exit                  
      MOV r1, #0x20
      STRB r1, [r3]
      ADD r3, r3, #1   
      MOV r1, #0x2B
      STRB r1, [r3]

      LDRB r1, [r3, #19] ; Checks if Mario is now under a space. This means he fell
      CMP r1, #0x20      ; off a ledge and died.
      BEQ death_handler

      BL MARIO_LADDER_REPAIR
      BL paint_box
      B FIQ_Exit


climb
      ; Checks if an H is above Mario or a Z or X is next to Mario. If so he can move up one space.

      LDRB r1, [r3, #-19]
      CMP r1, #0x40       ; barrel above mario kills him
      BEQ death_handler

      LDRB r1, [r3,#1]
      CMP r1, #0x58
      BEQ go_up
      CMP r1, #0x5A
      BEQ go_up

      LDRB r1, [r3,#-1]
      CMP r1, #0x58
      BEQ go_up
      CMP r1, #0x5A
      BEQ go_up

      LDRB r1, [r3, #-19]      
      CMP r1, #0x48
      BNE FIQ_Exit
go_up   MOV r1, #0x20
      STRB r1, [r3], #-19
      MOV r1, #0x2B
      STRB r1, [r3]
      
      BL MARIO_LADDER_REPAIR
      BL paint_box
      B FIQ_Exit


descend                                 
      ; Climb down a ladder. Mario can only climb down when an H is below him.

      LDRB r1, [r3, #19]
      CMP r1, #0x40
      BEQ death_handler


      LDRB r1, [r3, #19] ; Is character below Mario H?
      CMP r1, #0x48      ; If not exit interrupt.
      BNE FIQ_Exit
      MOV r1, #0x20
      STRB r1, [r3], #19      ; Clear out Mario's current location and update his location one line down
      MOV r1, #0x2B
      STRB r1, [r3]
      
      BL MARIO_LADDER_REPAIR
      BL paint_box
      B FIQ_Exit


jump_left
        
      
      LDRB r1, [r3,#1] ; This block checks if Mario is next to an X or Z.
      CMP r1, #0x58    ; If so he is on a ladder and cannot move horizontally
      BEQ FIQ_Exit    ; so the interrupt is exited.
      CMP r1, #0x5A
      BEQ FIQ_Exit
      LDRB r1, [r3,#-1]
      CMP r1, #0x58     
      BEQ FIQ_Exit
      CMP r1, #0x5A
      BEQ FIQ_Exit

      LDRB r1, [r3,#-1] ; Character left one space of mario
      CMP r1, #0x7C     ; Checks if space to left is a wall (|).
      BEQ FIQ_Exit     ; If so, do not move.

      MOV r1, #0x20
      STRB r1, [r3], #-20
      MOV r1, #0x2B
      STRB r1, [r3]


      BL paint_box

      B FIQ_Exit



jump_right

      LDRB r1, [r3,#1] ; This block checks if Mario is next to an X or Z.
      CMP r1, #0x58    ; If so he is on a ladder and cannot move horizontally
      BEQ FIQ_Exit    ; so the interrupt is exited.
      CMP r1, #0x5A
      BEQ FIQ_Exit
      LDRB r1, [r3,#-1]
      CMP r1, #0x58     
      BEQ FIQ_Exit
      CMP r1, #0x5A
      BEQ FIQ_Exit

      LDRB r1, [r3,#1] ; Character right one space of mario
      CMP r1, #0x7C     ; Checks if space to left is a wall (|).
      BEQ FIQ_Exit     ; If so, do not move.

      MOV r1, #0x20
      STRB r1, [r3], #-18
      MOV r1, #0x2B
      STRB r1, [r3]

      BL paint_box

      B FIQ_Exit



death_handler

      ; Stops game and prints a message to screen
      ; telling player they have died and prompting them
      ; to press F to restart the level. Also removes one life
      ; from Mario's total and checks if has any left. If not,
      ; a game over condition is achieved.

      BL disable_timer
      LDR r1, =line00
      LDRB r0, [r1]
      BL output_string
      LDR r1, =message1
      LDRB r0, [r1]
      BL output_string
      LDR r1, =message2
      LDRB r0, [r1]
      BL output_string
prompt   BL read_character
      CMP r0, #0x66
      BNE prompt
      ;B retry
      
      BL MARIO_LADDER_REPAIR
      B lab7

MARIO_LADDER_REPAIR

   ;Repairs board ladders after mario moves in case they are cleared. Checks each space a ladder can be and puts and H there if there is a space.

   STMFD SP!, {r7, lr}      
      LDR r1, =line22
      LDRB r2, [r1, #0xC]
      CMP r2, #0x20
      BNE MARIO_LNEXT1
      MOV r2, #0x48
      STRB r2, [r1, #0xC]

MARIO_LNEXT1
      
         LDRB r2, [r1, #0x18]
      CMP r2, #0x20
      BNE MARIO_LNEXT2
      MOV r2, #0x48
      STRB r2, [r1, #0x18]


MARIO_LNEXT2
                     
         LDRB r2, [r1, #-0x7]
      CMP r2, #0x20
      BNE MARIO_LNEXT3
      MOV r2, #0x48
      STRB r2, [r1, #-0x7]


MARIO_LNEXT3
      
         LDRB r2, [r1, #-0x1A]
      CMP r2, #0x20
      BNE MARIO_LNEXT4
      MOV r2, #0x48
      STRB r2, [r1, #-0x1A]

MARIO_LNEXT4
         LDRB r2, [r1, #-0x36]
      CMP r2, #0x20
      BNE MARIO_LNEXT5
      MOV r2, #0x48
      STRB r2, [r1, #-0x36]

MARIO_LNEXT5
         LDRB r2, [r1, #-0x49]
      CMP r2, #0x20
      BNE MARIO_LNEXT6
      MOV r2, #0x48
      STRB r2, [r1, #-0x49]

MARIO_LNEXT6
         LDRB r2, [r1, #-0x5C]
      CMP r2, #0x20
      BNE MARIO_LNEXT7
      MOV r2, #0x48
      STRB r2, [r1, #-0x5C]

MARIO_LNEXT7
         LDRB r2, [r1, #-0x67]
      CMP r2, #0x20
      BNE MARIO_LNEXT8
      MOV r2, #0x48
      STRB r2, [r1, #-0x67]

MARIO_LNEXT8
         LDRB r2, [r1, #-0x7A]
      CMP r2, #0x20
      BNE MARIO_LNEXT9
      MOV r2, #0x48
      STRB r2, [r1, #-0x7A]

MARIO_LNEXT9
         LDRB r2, [r1, #-0x8D]
      CMP r2, #0x20
      BNE MARIO_LNEXT10
      MOV r2, #0x48
      STRB r2, [r1, #-0x8D]

MARIO_LNEXT10
         LDRB r2, [r1, #-0xA6]
      CMP r2, #0x20
      BNE MARIO_LNEXT11
      MOV r2, #0x48
      STRB r2, [r1, #-0xA6]

MARIO_LNEXT11
         LDRB r2, [r1, #-0xB9]
      CMP r2, #0x20
      BNE MARIO_LNEXT12
      MOV r2, #0x48
      STRB r2, [r1, #-0xB9]

MARIO_LNEXT12
         LDRB r2, [r1, #-0xCC]
      CMP r2, #0x20
      BNE MARIO_LNEXT13
      MOV r2, #0x48
      STRB r2, [r1, #-0xCC]

MARIO_LNEXT13
         LDRB r2, [r1, #-0xD8]
      CMP r2, #0x20
      BNE MARIO_LNEXT14
      MOV r2, #0x48
      STRB r2, [r1, #-0xD8]

MARIO_LNEXT14
         LDRB r2, [r1, #-0xEB]
      CMP r2, #0x20
      BNE MARIO_LNEXT15
      MOV r2, #0x48
      STRB r2, [r1, #-0xEB]

MARIO_LNEXT15
         LDRB r2, [r1, #-0xFE]
      CMP r2, #0x20
      BNE MARIO_LNEXT16
      MOV r2, #0x48
      STRB r2, [r1, #-0xFE]

MARIO_LNEXT16
         LDRB r2, [r1, #-0x116]
      CMP r2, #0x20
      BNE MARIO_LNEXT17
      MOV r2, #0x48
      STRB r2, [r1, #-0x116]

MARIO_LNEXT17
         LDRB r2, [r1, #-0x129]
      CMP r2, #0x20
      BNE MARIO_LNEXT18
      MOV r2, #0x48
      STRB r2, [r1, #-0x129]

MARIO_LNEXT18
         LDRB r2, [r1, #-0x13C]
      CMP r2, #0x20
      BNE MARIO_LNEXT19
      MOV r2, #0x48
      STRB r2, [r1, #-0x13C]

MARIO_LNEXT19
         LDRB r2, [r1, #-0x96]
      CMP r2, #0x20
      BNE MARIO_LNEXT20
      MOV r2, #0x23
      STRB r2, [r1, #-0x96]

MARIO_LNEXT20
         LDRB r2, [r1, #-0x102]
      CMP r2, #0x20
      BNE mario_end
      MOV r2, #0x23
      STRB r2, [r1, #-0x102]
   LDMFD SP!, {r7, lr}
   BX LR

mario_end
      LDMFD SP!, {r0-r2, r8-r12, lr}   ; Restore registers
      B FIQ_Exit             ; exit

Timer         ; Check for Timer interrupt
      LDR r0, =0xE0004000     ; Timer Interrupt Register
      LDR r1, [r0]
      TST r1, #2
      BEQ FIQ_Exit
   
      STMFD SP!, {r0-r2, r8-r12, lr}   ; Save registers
      
      ; TIMUR INTRAPY CWODE GHOEZ HHRE
Check_ladder
   
      ;Checks if BARRELS go down ladder

      LDR r1, =line20
      LDRB r2, [r1, #-0x7]
      CMP r2, #0x40
      BNE checknext1
      CMP r8, #1
      BNE checknext1
      MOV r2, #0x20
      BEQ fall_random



checknext1
      LDR r1, =line20
      LDRB r2, [r1, #-0x49]
      CMP r2, #0x40
      BNE checknext2
      CMP r8, #1
      BNE checknext2
      MOV r2, #0x20
      BEQ fall_random


checknext2
      LDR r1, =line20
      LDRB r2, [r1, #-0x7A]
      CMP r2, #0x40
      BNE checknext3
      CMP r8, #1
      BNE checknext3
      MOV r2, #0x20
      BEQ fall_random


checknext3
      LDR r1, =line20
      LDRB r2, [r1, #-0x83]
      CMP r2, #0x40
      BNE checknext4
      CMP r8, #1
      BNE checknext4
      MOV r2, #0x20
      BEQ fall_random


checknext4
      LDR r1, =line20
      LDRB r2, [r1, #-0xB9]
      CMP r2, #0x40
      BNE checknext5
      CMP r8, #1
      BNE checknext5
      MOV r2, #0x20
      BEQ fall_random
   

checknext5
      LDR r1, =line20
      LDRB r2, [r1, #-0xEB]
      CMP r2, #0x40
      BNE checknext6
      CMP r8, #1
      BNE checknext6
      MOV r2, #0x20
      BEQ fall_random

checknext6
      LDR r1, =line20
      LDRB r2, [r1, #-0xEF]
      CMP r2, #0x40
      BNE Check_right
      CMP r8, #1
      BNE Check_right
      MOV r2, #0x20
      BEQ fall_random




   





Check_right      
        ;Barrels goes right

      
Line7
      
      LDR r1, =line07
      ADD r1, r1, #13
check7   LDRB r2, [r1,#-1]!
      CMP r2, #0x7C
      BEQ Line13   
      CMP r2, #0x40
      BNE check7

      MOV r2, #0x20
      STRB r2, [r1]
      LDRB r2, [r1, #1]
« Last Edit: January 24, 2012, 09:44:32 PM by Otis Da HousKat »

what the forget have you done

GAH OTIS PAGESTRETCH MUCH

Very neat though.