This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; PSGlib.inc を z88dk-z80asm 向けに変更したものです | |
; copied from https://github.com/sverx/PSGlib/blob/c21bb78d3e02c47fac9f669c9d33b4d668799170/src/PSGlib.inc | |
;================================================================ | |
; PSGlib - Programmable Sound Generator audio library - by sverx | |
; https://github.com/sverx/PSGlib | |
;================================================================ | |
; NOTE: this uses a WLA-DX 'ramsection' at slot 3 | |
; If you want to change or remove that, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* PMD extractor */ | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
int main(int argc,char* argv[]) | |
{ | |
char fn[16]; | |
int ret=-1; | |
FILE* fp=NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* FT6336U Capacitive touch panel driver for RP2040 (RaspberryPi Pico) | |
* | |
* Copyright (c) 2023 Yoji Suzuki. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bin/vgsrun examples/hello/hello.rom | |
$8000: LDA #$00 (a=$00, x=$00, y=$00, s=$00, p=$02) | |
$8002: STA $5404 (a=$00, x=$00, y=$00, s=$00, p=$02) | |
$8005: LDX #$00 (a=$00, x=$00, y=$00, s=$00, p=$02) | |
$8007: LDA $8018, X (a=$48, x=$00, y=$00, s=$00, p=$00) | |
$800A: STA $63C7, X (a=$48, x=$00, y=$00, s=$00, p=$00) | |
$800D: INX (a=$48, x=$01, y=$00, s=$00, p=$00) | |
$800E: CPX #$12 (a=$48, x=$01, y=$00, s=$00, p=$80) | |
$8010: BNE $F5 (a=$48, x=$01, y=$00, s=$00, p=$80) | |
$8007: LDA $8018, X (a=$65, x=$01, y=$00, s=$00, p=$00) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void functionWithCallback(void(*callback)(int, int)) { | |
callback(1234, 5678); | |
} | |
void callback(int a, int b) { | |
printf("a=%d, b=%d\n", a, b); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo commits: `git log --since=1971-01-01 --until=2035-12-31 --oneline --no-merges | wc -l` | |
echo added: `git log --since=1971-01-01 --until=2035-12-31 --oneline --numstat --no-merges --pretty=format:"" | cut -f1 | awk 'BEGIN {sum=0} {sum+=$1} END {print sum}'` | |
echo deleted: `git log --since=1971-01-01 --until=2035-12-31 --oneline --numstat --no-merges --pretty=format:"" | cut -f2 | awk 'BEGIN {sum=0} {sum+=$1} END {print sum}'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef _WIN32 | |
#include <windows.h> | |
#else | |
#include <unistd.h> | |
#endif | |
#include <stdio.h> | |
#include "vgsspu.h" | |
#ifdef _WIN32 | |
static void usleep(int usec) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ファミコンの音程 ($4002-$4003 に設定すべき値) */ | |
#include <stdio.h> | |
#define S 44100.00 | |
#define B 1.0594631 | |
#define PI 3.1415926535897932 | |
#define PI2 6.2831853071795864 | |
#define CPU 1790000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
#include <stdio.h> | |
HWND GetConsoleHwnd(void) | |
{ | |
#define MY_BUFSIZE 1024 | |
HWND hwndFound; | |
char pszNewWindowTitle[MY_BUFSIZE]; | |
char pszOldWindowTitle[MY_BUFSIZE]; | |
GetConsoleTitle(pszOldWindowTitle, MY_BUFSIZE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# VGSのセットアップ | |
cd ~/ | |
git clone https://github.com/suzukiplan/vgs2.git vgs2 | |
cd vgs2/bin_src | |
make | |
export VGS2_HOME=~/vgs2 | |
export PATH=$PATH:$VGS2_HOME/bin | |
# 次回起動時に環境変数の設定を省略するための手順 |
NewerOlder