Skip to content

Instantly share code, notes, and snippets.

View knight-ryu12's full-sized avatar
🔧
making questionable quality softwares.

Chromaryu knight-ryu12

🔧
making questionable quality softwares.
  • Japan
View GitHub Profile
SBCdatabase Dataformat
Must:
Name
Small Description
CPU Name
GPU Name
Memory size
Storages
Video Output
#include "screen.hpp"
#ifdef __cplusplus
extern "C" {
#endif
void lcd_init(SoftWire *sw) {
delay(100);
Serial.printf(F("LCD Init.\n"));
for(uint8_t i=0; i<3; i++) {
#include <stdint.h>
#include <driver/gpio.h>
#include "esp_log.h"
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <rom/ets_sys.h>
// GPIO22 = SCK

SonaMML Japanese Document

NAME

SonaMMLはmml2sona用のMML記法です。 このドキュメントはmml2sonaV 0.50用です。 このドキュメントはMMLの標準的な記法は書かれていません

SonaMML

MMLチャンネル割り当て

チャンネルは以下の通りに割り当てられています。

; this program is basically parallel 8bit IO.
.program ym2413_io
.side_set 1
.wrap_target
out pins, 8 side 0 ; output 8 bit into GPIO n ~ n+7
nop side 1
.wrap
#pragma once
enum ST7796_CMD {
// CMD List 1
// Read commands/ Op Commands
NOP = 0x00,
SWRESET = 0x01,
RDDID = 0x04,
// DSI = 5;
RDDST = 0x09,
0x01 0x01 0x3A ':'
0x02 0x01 [0-9A-Za-z] (データ種別)
0x03 0x04 データサイズ (A) (16進で0000-FFFFまでASCIIで表現) 0でもいい。
0x07 0x01 0x3A ':'
0x08 A データ (フォーマットはデータ種別によって違う)
A+1 0x01 '\n'
A+2 0x08 16進で00000000-FFFFFFFFまでで上のCRC-32
A+C 0x01 '\n'

VGM OPL4

OPL4 External Memory Format

0000h D 1 D 0 S21 S20 S19 S18 S17 S16
0001h S15 S14 S13 S12 S11 S10 S09 S08
0002h S07 S06 S05 S04 S03 S02 S01 S00
0003h L15 L14 L13 L12 L11 L10 L09 L08
0004h L07 L06 L05 L04 L03 L02 L01 L00

Regiser Slot 1

address 7 6 5 4 3 2 1 0
01 TEST7 TEST6 TEST5 TEST4 TEST3 TEST2 TEST1 TEST0
#include <stdint.h>
uint32_t d[8];
uint32_t a[8];
bool Z;
writeSR(0x2700); // Disable all Interrupt (move 0x2700, sr)
Z = read32(0xa10008)==0?true:false; // tst.l 0xa10008
if(!Z) goto SkipJoyDetect; // bne.s SkipJoyDetect
Z = read32(0xa1000c); // tst.l 0xa1000c
SkipJoyDetect:
if(!Z) goto SkipSetup; // bne.s SkipSetup