A game is born
April 25, 2022
The year is 2020 and the world is facing the COVID-19 pandemic, which forced lockdowns around the globe. Brazil was no exception and families had to adapt to having schools closed and people working from home. After a couple of weeks of that new reality, my son Rafael, then nine years old, turned to me […]
Squeezing out cycles from loops
October 25, 2018
When studying Z80 programming, we usually learn that is better to use relative jumps (JR) in loops since they save us a byte in code compared to absolute jumps (JP). Well, that’s certainly the case, but when you are squeezing out cycles from code, one place to look at is the loops you have. A conditional relative […]
Carregando arquivos .CAS para TRS-80 na Multicore 2
August 25, 2018
Enfim, consegui colocar as mãos na Multicore 2 e rapidamente fui testá-la. Para tal, escolhi o core do TRS-80, já que o CP500 foi o primeiro computador que usei na vida, no meu primeiro curso de informática, lá pelos idos de 1986. Pois bem, ao baixar o core do TRS-80 descobri que a MC2 ainda não tem […]
Z80 nibbles
August 11, 2017
* The least significant byte is stored first when referencing a 16-bit number in memory. * There’s no LD instruction to load a value into a register pair from another pair. When needed, you can use single register load instructions, like LD H, B and LD L, C. * You can use ADD and ADC instructions […]
LD instructions
May 31, 2017
Let’s examine how the load instructions are structured in the Z80. It is important to say upfront that most of Z80 instruction’s design was taken from the Intel’s 8080 CPU. The Zilog engineers kept binary code compatibility with the 8080, while expanding the design with new and extended instructions. A generic load instruction takes the following […]
Z80 addressing modes
May 29, 2017
Machine code was made simple. Everything it does is move data around and do basic logic/arithmetic operations. Every single CPU instruction can be mapped into those two things. Everything else in computer programming are just abstraction layers added on top of this simple mechanism. Amazing, isn’t it? So, in order to do what they are supposed […]
Z80 timing
May 24, 2017
So, I started reading about the Z80 architecture these days. In order to better program a CPU, you better understand its inner workings first. I’ve gotten to know the difference between clock cycle (aka T-cycle) and machine cycle (M-cycle). A T-cycle is just a single square wave provided by the system clock, which has a duration […]
New friends
May 23, 2017
The Spectrum Next’s kickstarter campaign has come to an end with a tremendous success as £723,390 has been pledged by 3,113 backers all around the world. A great community has been building up long before the campaign even started which had culminated in this past month. Now, it is time to keep the community going […]
Pixels on Paper
May 19, 2017
From the very first time a saw a computer, I have always wanted to make a game. And probably the same happened to many of you. My first and only game was a Pac-man style one written in BASIC in a TRS-80. I recall myself drawing the maze on a square paper. I was 12, I […]
Going BASIC
May 19, 2017
Once I have had set up my emulator of choice, I really wanted to try some BASIC programming, like the old times. I recall the INPUT magazine being a great source of information, at least here in Brazil. It covered BASIC programming, the basics of coding games and even some machine code. INPUT was a great collection and […]