Skip to content

Commit 8810967

Browse files
committed
documented
1 parent 478c13b commit 8810967

File tree

8 files changed

+96
-707
lines changed

8 files changed

+96
-707
lines changed

GOALS.md

+18
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Stream day 11 - incbin bin code is overwritten somehow
1616
Stream day 14 - stop drawable overflow from the boundary
1717
Stream day 15 - draw enemy and try collision
1818

19+
20+
21+
22+
1923
# OFF stream stuff
2024
1. Install bochs
2125
2. Show navigatable upto date code of IO buffer for viewers
@@ -24,3 +28,17 @@ Stream day 15 - draw enemy and try collision
2428
overflow of times data - go through entire codebase, other bootloader files too!!
2529
bullet indexing - RTFM clearly!!
2630

31+
32+
33+
34+
35+
36+
AGENDA FOR TODAY
37+
* Document the code.
38+
* Create better maps
39+
* makeFile fix
40+
* Known issues
41+
42+
43+
44+

Makefile

-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
SHELL=/bin/bash
22
.DELETE_ON_ERROR:
3-
# If the first argument is "run"...
43
ifeq (run,$(firstword $(MAKECMDGOALS)))
5-
# use the rest as arguments for "run"
64
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
7-
# ...and turn them into do-nothing targets
85
$(eval $(RUN_ARGS):;@:)
96
endif
107

README.md

+18-100
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,25 @@
1-
# Disassembler! Sort of a pun. Assembly
1+
# Disassembler
2+
Game Development in assembly.
23
![](https://github.com/hackbacc/disassembler/raw/master/progress.gif)
34

5+
A plug & play game in assmebly for i386 architecture. All you need is a -
6+
Microcontroller with i386 architecture and a display attached to it.
47

5-
Disassembles enemy ships?!
8+
## Try running locally using qemu -
9+
```shell
10+
make clean && make run disassembler
11+
```
612

7-
-------------------------------------------------------------------------------------------------------------------------------------
13+
## About the game -
14+
* Control the player ship using WASD to kill all the enemy ships in vicinity.
15+
* You level up when there are no more enemies on the screen left.
16+
* Difficulty increases with levelling up, number of ships increase, their frequency of firing bullet increase but your ship's speed increases as well.
17+
* If you lose press r to reset the game, starting with a new level 1.
818

19+
## Maps
20+
* Draw your own maps by editing disassembler/map*.bin files for each level.
21+
* E represents location of enemy ship on map and P represents location of player ship on map.
922

10-
xxxxxxx xxxxxxx oooxxxx xxxxxxx
11-
xxxxx xxxxx oxoxxx xxxxx
12-
xxx xxx oooxx xxx
13-
x x x x
23+
## Resource
24+
https://github.com/hackbacc/disassembler/raw/master/resources.md
1425

15-
|
16-
xxxxxxx xxxxxxx xxxxxxx xxxxxxx
17-
xxxxx xxxxx xxxxx xxxxx
18-
xxx xxx xxx xxx
19-
x x x x
20-
21-
|
22-
xxxxxxx xxxxxxx xxxxxxx xxxxxxx
23-
xxxxx xxxxx xxxxx xxxxx
24-
xxx xxx xxx xxx
25-
x | x x x
26-
27-
|
28-
|
29-
|
30-
0
31-
000
32-
00000
33-
0000000
34-
-------------------------------------------------------------------------------------------------------------------------------------
35-
36-
## Rules:
37-
1. Game is like space invaders. Enemy ships will keep falling from the sky like 'tetris' at a slower pace.
38-
2. Our ship will be at the bottom with a laser turret.
39-
40-
## Ship's capabilites -
41-
1. One iota of laser will kaboom one pixel square areas of the enemy ship.
42-
2. Firing speed can be altered.
43-
3. The kaboom range can be altered.
44-
4. The ship size and speed can be altered. Size can be proportional to the speed of the ship. You get to choose?
45-
5. Type of ships.
46-
47-
## Enemy ship's capabilities -
48-
1. Simple: One hit one kill.
49-
2. Extended: Player's ship has some health?
50-
3. Degree of freedom is one in the beginning.
51-
52-
## Type of enemy ships -
53-
1. Small zombie thug ships, slow rate of fire (RoF) but large in number. High probability of spawning.
54-
2. Mid size thug ships with larger turrets.
55-
3. Extended: Boss ship with humongous size and multiple turrets ? Slow movement.
56-
4. Simple: The enemy can be of various sizes? Round? Shapeless.
57-
58-
## Arena or game environment -
59-
1. Simple: We can fix the player's ship and change the environment, enemies keep piling up like tetris.
60-
2. Extended version (DLC?!): The player ship has four degree of freedoms and it can score points based on the number of enemy ships it wrecks!
61-
3. Extended: Space mines? Environmental factors which can be used.
62-
4. 45 degree bullets of enemies.
63-
64-
# MISC -
65-
1. Player stats, high score!
66-
2. Number of ships (lives).
67-
68-
69-
## Resources -
70-
http://employees.oneonta.edu/higgindm/assembly/video_games.htm
71-
http://www.skynet.ie/~darkstar/assembler/tut6.html
72-
http://www.wagemakers.be/english/doc/vga
73-
http://www.gabrielececchetti.it/Teaching/CalcolatoriElettronici/Docs/i8086_and_DOS_interrupts.pdf
74-
https://wiki.osdev.org/Drawing_In_Protected_Mode#Locating_Video_Memory
75-
https://wiki.osdev.org/Printing_to_Screen
76-
http://mikeos.sourceforge.net/write-your-own-os.html
77-
https://www.codeproject.com/Articles/664165/Writing-a-boot-loader-in-Assembly-and-C-Part
78-
http://faydoc.tripod.com/cpu/ Special directives
79-
https://www.glamenv-septzen.net/en/view/6 why 0x7C00
80-
http://www.ctyme.com/intr/int.htm interrupts all
81-
https://montcs.bloomu.edu/Information/LowLevel/assembly64.pdf macro labels %%
82-
83-
https://wiki.osdev.org/Interrupt_Vector_Table IVT
84-
https://nasm.us/doc/nasmdoc0.html HOLY GRAIL OF ASM LANG
85-
https://www.daniweb.com/programming/software-development/threads/256108/problem-with-nasm-s-times-directive why remove .section segments
86-
https://0x00sec.org/t/realmode-assembly-writing-bootable-stuff-part-1/2901 this awesome tutorial
87-
88-
https://www.partitionwizard.com/help/what-is-chs.html Cylinder-head-sector
89-
https://www.pngfind.com/pngs/m/189-1896680_galaga-galaga-ship-hd-png-download.png
90-
https://thestarman.pcministry.com/linux/bochsrc.bxrc.htm # bochs src file
91-
https://www.cs.princeton.edu/courses/archive/fall06/cos318/precepts/bochs_tutorial.html # bochs startup setup tutorial
92-
93-
* structures
94-
https://www.d.umn.edu/~gshute/asm/data-structures.xhtml
95-
https://www.csee.umbc.edu/courses/undergraduate/313/spring05/burt_katz/lectures/Lect10/structuresInAsm.html
96-
https://stackoverflow.com/questions/26723567/accessing-an-array-of-structs-in-assembly how to align structures
97-
98-
https://ya-webdesign.com/image/2d-space-ship-png/834235.html images ship
99-
100-
* Timer IVT 1Ch
101-
http://www.ctyme.com/intr/rb-2443.htm
102-
http://www.gpcet.ac.in/wp-content/uploads/2018/03/mpi-1-22.pdf
103-
https://en.wikipedia.org/wiki/Linear-feedback_shift_register
104-
105-
106-
https://stackoverflow.com/questions/51693306/registering-interrupt-in-16-bit-x86-assembly/51694601 * KEYBOARD ISR
107-
https://www.google.com/search?q=using+keyboard+interrupt+assembly&oq=using+keyboard+interrupt+assembly&aqs=chrome..69i57j33l2.10511j0j9&sourceid=chrome&ie=UTF-8

bootloader.asm

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ mov cl, 0x02 ; each sec
1010
mov ch, 0x00 ; cylinder number (first cylinder)
1111
;mov dl, xxx ; drive number is auto filled upon reset in dl
1212
mov dh, 0x00 ; head number (first head)
13-
mov al, 0x14 ; n of sectors to read
13+
mov al, 0x10 ; n of sectors to read
1414
mov ah, 0x02 ; read disk sectors from drive into memory.
1515
mov bx, 0x8000; address of the available user space
1616
int 0x13

0 commit comments

Comments
 (0)