SonaMMLはmml2sona用のMML記法です。 このドキュメントはmml2sonaV 0.50用です。 このドキュメントはMMLの標準的な記法は書かれていません。
チャンネルは以下の通りに割り当てられています。
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 |
; 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' |
#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 |