t0mek
Joined 10 years ago
Joined 10 years ago
This machine indeed has 128 bytes of RAM, but the code and data live on the cartridges, which can include up to 64 KB of ROM (exposing 4 KB at a time, with bank switching). Also, graphics is created on the fly ("racing the beam") at TV display, so there's no need to spend precious RAM on the framebuffer.
In comparison to the later constructions based on the 6502, like NES or C64, it was certainly not an easy platform to develop games, but not as hard as your comment is suggesting.
* A quadratic formula program, which outputs the number of roots and the x-intercepts upon the user inputting the values of A, B, and C.
* A fighting game, with health, a store, different enemies, weapons, armor, etc, with graphics and animation.
x = [
123,
456,
789,
];
It makes editing such a list so much easier. Also, the commit diffs are cleaner (you don't need to add comma to the last element when appending a new one).https://www.slideshare.net/slideshow/emulating-game-boy-in-j...
Essentially, there are 4 channels, each providing a number 0-15 on every tick. Emulator should mix them together (arithmetic average), scale up to 0-255 and feed to the sound buffer, adjusting the tick rate (4.19MHz) to the sound output rate (e.g.: 22 kHz) - taking every ~190 value (4.19MHz / 22 kHz) is a good start.
Now the 0..15 value that should be produced by each channel depends on its characteristics, but it's well documented:
https://gbdev.gg8.se/wiki/articles/Gameboy_sound_hardware
Channels 1 and 2 produce square waves, so a bunch of low (0) and high (15) values, with optional volume envelope (gradually going down from 15 to 0 on the "high" part of the square) and frequency sweep (alternating 0s and 15s slower or faster).
Channel 3 allows an arbitrary waveform, read from the memory.
Channel 4 is a random noise, generated by the LSFR.
See SoundModeX.java for the reference:
https://github.com/trekawek/coffee-gb/tree/master/src/main/j...
> If you stand for nothing, Burr, what'll you fall for?
https://newton-net-pl.translate.goog/2012/01/robot/?_x_tr_sl...
It was made of an old HTC Magic phone, acting as camera+wifi transmitter, connected to Arduino via its serial port and level shifter, to control the servo and a RGB LED. I had a lot of fan with that, even if the connection wasn't really to stable.
Thanks for sharing, maybe it's time to revive the project with the next generation of the microcontroller.
1. If they don't have any hats, then any sentence about them would be truth.
2. The negation of the sentence, which must be truth, is "not all my hats are green". For this to be true, there must be some hats that are not green, so there must be some hats in general.
Also, there's interesting implementation for the ZX-81, created over 20 years later and fitting in just 1024 bytes: https://users.ox.ac.uk/~uzdm0006/scans/1kchess/
Then if we figure out that both p and q are even, it means that p/q can be simplified (by dividing p and q by 2), which contradicts the assumption about the simplest form - and we don't need to use the infinite descent.