An example Game Boy project. The main functionality is in src/main.asm.
To build, install rgbds and put it in your path.
Then run make
. This will create bootstrap.gb
.
An example Game Boy project. The main functionality is in src/main.asm.
To build, install rgbds and put it in your path.
Then run make
. This will create bootstrap.gb
.
db
in RGB macro should be dw
In Init: there are these two lines:
; Filling vram is not really necessary.
; fill $8000, $2000, 0
On some emulators (VBA) and on a real Gameboy Color, the BG map is already all cleared, so filling VRAM is unnecessary. But on other emulators (BGB), the BG map has some artifacts in it, resulting in this:
Plus, if a game intentionally has a soft-reset option, it may be desirable to deliberately clear VRAM.
So for sanity, maybe this line should be un-commented.
In this snippet from rst.asm:
FarCall_:
ld [wFarCallHold + 0], a
put [wFarCallHold + 1], h
put [wFarCallHold + 2], l
[ ... ]
ld hl, wFarCallHold + 1
ld a, [hli]
ld h, [hl]
ld l, a
This ends up swapping h
and l
Could just put
l
before h
Also, at the end, this bit attempts to save the potential return value in a
and/or f
while pulling the rom bank off the stack, but leaves a hole in the stack:
push af
add sp, 2
pop af ; hROMBank
add sp, -4
rst Bankswitch
pop af
ret
It needs an extra add sp, 2
at the end:
push af
add sp, 2
pop af ; hROMBank
add sp, -4
rst Bankswitch
pop af
add sp, 2
ret
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.