When writing code to be compiled with SDCC targetting Z80, assembler code fragments can be inserted in the C functions by enclosing them between the __asm
and __endasm;
tags:
void DoNotDisturb()
{
__asm
di
# MSX BASIC tokenized file parser written in Ruby | |
# By Konamiman, http://www.konamiman.com | |
# This is my first Ruby thing, so improvement suggestions are highly welcome | |
def main | |
check_parameters | |
@file_bytes_enumerator = read_file_bytes.each | |
@output_file = create_output_file |
I love MSX computers. I have developed quite a few things for them, including a TCP/IP stack and some networking applications. Some other MSX nerds have developed networking hardware, so boom! Here it is, Internet access from MSX, a 1980s 8 bit machine. How cool is that?
However there are a few issues that prevent us the MSX users to reach the absolute networking happiness:
So
This document explains how to stunnel for the Raspberry Pi (or more precisely, for the ARM architecture). All the information here has been gathered, and adapted where needed, from these blog posts: "Cross compiling for ARM with Ubuntu 16.04 LTS" and "Cross-compile OpenSSL for your Raspberry Pi". I needed to do that in order to be able to use my Raspberry Pi to provide Internet via WiFi for my Ethernet-only MSX. The OS I used as the building host is Linux Mint 18.3.
This is just a concise recipe and I'm not going to explain the details, feel free to take a look at the linked blog posts for more information.
First we are going to create a temporary directory for all the dirty work.
cd ~/
This guide explains how to migrate a Nextor driver from v2 to v3. The reader is expected to have experience with Nextor v2 driver development.
Only the changes relative to the structure of the driver for v2 are mentioned here. You can see the skeleton for a full v3 driver in the Nextor-v3-driver.asm
in this same gist, and the skeleton for a full v2 driver in the Nextor repository.
The driver flags byte needs to be changed to the fixed value 83h. Bit 7 indicates that the driver is a v3 driver, bits 0 and 1 need to be set for consistency with the meaning they had in Nextor v2.
/** | |
* Skeleton for a USB device implementation with a CH372/375/376. | |
* | |
* No real device functionality is implemented, | |
* only the standard USB requests over the control endpoint. | |
*/ | |
#include "constants.h" | |
How to connect a CH376 to a Z80 via I/O ports 20h and 21h (compatible with Rookie Drive):
Z80 | 74HC688 | CH376 |
---|---|---|
5V | 5V | 5V |
GND | GND | GND |
D7...D0 | D7...D0 | |
RD | RD | |
WR | WR | |
A0 | A0 |
This program will parse and print the structure of a relocatable (.REL) Z80 code file generated with the Macro80 assembler (M80.COM) and processable with Link80 (L80.COM). See ParseRel.cs
for build instructions.
More information on Macro80/Link80 and the .REL format: http://www.msxarchive.nl/pub/msx/programming/asm/m80l80.txt
using System; | |
using System.Globalization; | |
using System.Linq; | |
using System.Numerics; | |
using System.Security.Cryptography; | |
class Example | |
{ | |
public static void Main() | |
{ |