Language…
7 users online: BabyBlueFord, devastatorx, Heitor Porfirio, Lush_50, Mario's GameBase,  patcdr, Sonikku - Guests: 56 - Bots: 219
Users: 65,902 (2,194 active)
Latest user: samgalyy

Questionable HackJam #1 - Resource Sharing Thread

Use this thread to share or show off any of resources you've created that you think would be of interest to HackJam teams. Remember they must be public resources! So if you're sharing in this thread you must share the resource itself.
Since MSU-1 is allowed this time i thought i should share this:

.msu file data compiler

Code
!MSU_SEEK = $2000
!MSU_READ = $2001

macro dma_msu(source,dest,size)
	PHP : SEP #$10 : REP #$20
	
   	LDA <source>     : STA !MSU_SEEK
   	LDA <source>>>16 : STA !MSU_SEEK+2
	
	LDA #$0080       : STA $2115 	; normal increment after writing $2119, no remap
	LDA <dest>       : STA $2116	; VRAM address to transfer to
	LDA #$1809       : STA $4300  	; fixed transfer, 2 regs write once to $2118
	LDA #!MSU_READ 	 : STA $4302	; source $00:2001, msu data read
	LDX #$00         : STX $4304
	LDA <size>       : STA $4305	; # of bytes to transfer
	LDX #$01         : STX $420b 	; start DMA
	PLP
endmacro


The code above is MSU-1 > VRAM transfer, it's suitable for use during UberASM's nmi: and init: labels.

You still have a problem though, you'd have to know the inserted data's memory addresses in the .msu file, which is tedious to do, so i've made this program that compiles a bunch of .bin files into an .msu file and outputs their memory locations as labels in an .asm file.

Usage:
Put asar.exe in the same folder and create a new folder named files, then put all of your .bin format data in the folder and run the .bat file, the outputs should be an .msu file (that should be in the same folder and has the same name as your rom) and a file that contains something like this:
Code
; msu-1 labels 
include 
hugefile = 0
GFX00 = 860160
GFX0B = 864256
tileset1 = 868352

The generated labels are the file names of the .bin files that the folder contains.
Use incsrc "msu1_labels.asm" in your code to make use of the labels.

Example UberASM code:
Code
incsrc "msu1 stuff/msu1_labels.asm"

init:
dma_msu(tileset1,$0400,$800)	; (macro posted above)
RTL


Benny Harvey RIP, miss you big man.

Originally posted by AmperSam
Remember they must be public resources! So if you're sharing in this thread you must share the resource itself.


Would resources in sections count?
Originally posted by h.carrell
Would resources in sections count?


Yes, as those are published. The tl;dr is, don't just say you have music/asm/resources available without actually sharing them here.
I do have this collection of fart samples if anyone wishes to use one.
Here's the FNAF 2 Danger Ambience / Stinger if anyone wants to use it.