Skip to content

Instantly share code, notes, and snippets.

View SergioFLS's full-sized avatar

SergioFLS

  • Chile
View GitHub Profile
@SergioFLS
SergioFLS / aypsg2vgm.py
Last active November 26, 2023 05:37
converter of AY-3-8910 .PSG files to .VGM format
# aypsg2vgm.py: converter of AY-3-8910 .PSG files to .VGM format
#
# Copyright (c) 2023 SergioFLS
#
# 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
# furnished to do so.
@SergioFLS
SergioFLS / chunk_ids.h
Created July 27, 2022 16:18
Reading chunk sizes on a GameMaker IFF file
#ifndef CHUNK_IDS_H
#define CHUNK_IDS_H
#define ID_FORM 0x4d524f46
#define ID_GEN8 0x384e4547
#define ID_OPTN 0x4e54504f
// also under MIT-0, see gmiff.c
#endif
@SergioFLS
SergioFLS / gb2tgb.py
Last active July 1, 2018 22:46
.gb/.gbc converter tool to text game boy file extension (.tgb)
# gb2tgb by SergioFLS
# made for https://scratch.mit.edu/discuss/topic/60460/?page=1
# NOTE: this was only tested on Python 3.6.5. 3.x versions might work, but probably 2.x won't.
'''
links that helped me:
https://stackoverflow.com/questions/3964245/convert-file-to-hex-string-python
https://stackoverflow.com/questions/606191/convert-bytes-to-a-string
https://stackoverflow.com/questions/23766383/python-error-typeerror-function-takes-exactly-1-argument-5-given
https://stackoverflow.com/questions/9210525/how-do-i-convert-hex-to-decimal-in-python
http://www.pythonforbeginners.com/files/reading-and-writing-files-in-python
nice.
i converted the "mm2wood.mid" file then converted to ".ptcop" using Pxtonebox. i opened the converted file then i replaced the instruments.
Links/Downloads:
mm2wood.mid: http://www.midishrine.com/index.php?id=50
Pxtonebox and Pxtone collage: https://www.cavestory.org/download/music-tools.php
@SergioFLS
SergioFLS / cart2.lua
Last active April 20, 2018 02:03
part from cart.lua
-- tile 3 is an tree, tile 256 is the character
-- NOTE: Update() is executed trough function TIC()
function Update()
if btnp(0,30,3) then
if mget(x+14,y+7) == 2 then
sfx(1)
else
y=y-1
sfx(0)
end
@SergioFLS
SergioFLS / cart.lua
Created April 20, 2018 01:38
something i was making in TIC-80
-- title: game title
-- author: SergioFLS
-- desc: messing around with TIC-80
-- script: lua
function debug(enabled)
if enabled then
print("X: " .. x .. "\nY: " .. y .. "\nTitle ID: " .. mget(x+14,y+8) .. "\nDown Pressed: ",0,0)
end
end