Skip to content

Instantly share code, notes, and snippets.

View freem's full-sized avatar
⛏️
work continues

AJ Kelly freem

⛏️
work continues
View GitHub Profile
@freem
freem / fpr_logodata.txt
Last active March 22, 2016 02:29
Fire Pro Returns Logo Data
everything in this document is subject to change, especially since I don't know what I'm doing.
this assumes you've ripped the logo data from a FPR save file. the data for the first logo is at 0xC6010 with no edit
characters installed. your mileage may vary. I haven't been able to get past the save checksum yet (but I also haven't
really tried), so no editing yet.
0x0000-0x000F: some sort of header
0x0000: if this byte is 1, there is a logo here. otherwise, show "no data"
0x0001-0x000F: I have no idea!!!
[Jason Blackhart thinks this is garbage data; he zeroed it out and the game didn't complain, so I'm willing to agree]
@freem
freem / vdc.inc
Created March 5, 2016 21:32
(possible) ca65 version of vdc_data macro
.macro vdc_data dl, dh
.if .paramcount = 1
lda .lobyte(dl)
sta a:video_data_l
lda .hibyte(dl)
sta a:video_data_l
.else
lda dl
sta a:video_data_l
lda dh
@freem
freem / ca65_macros.inc
Last active March 9, 2016 11:07
possible solution for getting around the zero page problem with pceas and ca65
;;
;; macro: pcezp
;; Writes a PCE-relative zero page address (e.g. $2000-$3FFF)
;; __PCE_ZP_START__ must be defined in your linker configuration.
;;
.macro pcezp opcode,value
opcode __PCE_ZP_START__+value
.endmacro
;;
@freem
freem / example02.asm
Last active March 13, 2016 17:38
pce sprites wip
; fkit Example 02: Hello World with Sprites
;==============================================================================;
.include "pce.inc" ; hardware defines
.include "bank.inc" ; bankswitching macros
.include "ram_fkit.inc" ; fkit ram
.include "ram_user.inc" ; user ram
;==============================================================================;
.segment "VECTORS"
.addr fakeIRQ ; IRQ2
.addr IRQ1 ; IRQ1 (VDC)
@freem
freem / metatable_example.lua
Created July 22, 2016 02:26
an example of when metatables are useful
ProcessorFlags = {
Carry = false, -- 0 | (C) Carry for arithmetic and compares
Zero = false, -- 1 | (Z) Set when operation results in 0
IRQ = false, -- 2 | (I) enable/disable IRQ flag
Decimal = false, -- 3 | (D) decimal mode
Break = false, -- 4 | (B) [only available in stack version]
Unused = false, -- 5 | (-) "not used" in regular 6502 (always 1?)
Overflow = false, -- 6 | (V) Overflow for arithmetic and compares
Sign = false, -- 7 | (N) Negative value result
}
@freem
freem / luasim_log1.txt
Created July 23, 2016 16:37
Output of my Lua 6502 simulator (2016/07/23 11:37 WIP version)
freem@freemtop ~/freemdev/lua6502sim $ lua sim.lua test.bin c000
lua6502sim, hacked together by freem
Loading contents of test.bin at 0xC000
$C000: 78 sei A:00 X:00 Y:00 P:24 SP:00
$C001: D8 cld A:00 X:00 Y:00 P:24 SP:00
$C002: A2 FF ldx #$FF A:00 X:FF Y:00 P:A4 SP:00
$C004: 9A txs A:00 X:FF Y:00 P:A4 SP:FF
$C005: 8A txa A:FF X:FF Y:00 P:A4 SP:FF
$C006: 29 64 and #$64 A:64 X:FF Y:00 P:A4 SP:FF
$C008: 48 pha A:64 X:FF Y:00 P:A4 SP:FE
for some unknown reason, fceux uses base64 encoded values for window size multiplier (and aspect ratio too but that's less important)
anyways the important thing is this:
for 1x display (default unless you changed settings)
winsizemulx base64:AAAAAAAA8D8=
winsizemuly base64:AAAAAAAA8D8=
for 2x display
winsizemulx base64:AAAAAAAAAEA=
@freem
freem / projects.md
Last active September 30, 2016 20:06
the giant list of projects

freem's giant list of projects

trying to catalog everything "important" I've worked on and would like to work on.

things can be broken down into categories:

  • Reverse engineering projects
  • General software projects
  • NES homebrew games/utils
  • Neo-Geo homebrew games/utils
  • Efforts on other retro platforms
@freem
freem / readme-preview-0_0_1
Last active November 21, 2016 00:02
Fire Pro Returns Save Tool - Preview v0.0.1 Readme
FPRSaveTool - Fire Pro Wrestling Returns Save Tool (Preview Version 0.0.1)
(pre-release readme, dated 2016/11/20 (November 20, 2016))
==========================================================================
MAJOR NOTICE: This program is nowhere near done yet.
This preview version is being released to gauge feedback from the Fire Pro
community with regards to the program's interface/design.
================================================================================
@freem
freem / logic_compare.txt
Created March 5, 2017 17:21
Fire Pro Wrestling Returns data stuff
logic comparisons between default and patterned
================================================================================
| patterned | | default | | timid |
Standing |DMG S|DMG L| |DMG S|DMG L| |DMG S|DMG L|
----------+-----+-----+ +-----+-----+ +-----+-----+
Grapple | 93 | 1 | | 45 | 60 | | 0 | 0 |
Distance | 1 | 93 | | 14 | 5 | | 100 | 0 |
Circle | 1 | 1 | | 14 | 13 | | 0 | 100 |
Stand [] | 1 | 1 | | 10 | 2 | | 0 | 0 |