The Z80 can input/output a byte from/to any of 256 ports, which is useful for sending and receiving data from other parts of the system. On the SMS, these are the relevant ports - note that almost all of them are mirrored in other places but it gets confusing if you use the mirrors so I won’t go into it.

$3e Memory control
$3fI/O port control
$7eV counter 
$7fH counterPSG
$be VDP (data)
$bf VDP (control)
$dc, $ddControllersControllers

The main ones you will use with are highlighted in bold. To get a program running, you only really need the VDP ones.

< Registers | Lesson 1 | Walkthrough of Hello World >