Language…
26 users online: 1UPdudes, Abstract, badummzi,  Blaagon, CharlieUltra, CroNo, dashlet, Dennsen86, DixyNL, GamesInTweed, GiraffeKiller, Hammerer, Inflagrandy, JezJitzu,  MarioFanGamer, Metal-Yoshi94, MorrieTheMagpie, mtheordinarygamer, Papangu, playagmes169, rafaelfutbal, Romiori, Rykon-V73, Ryrir,  Segment1Zone2, TheOrangeToad - Guests: 289 - Bots: 484
Users: 64,795 (2,369 active)
Latest user: mathew

VWF Dialogues v1.4

Patch

Well I'll have to expand SRAM anyways (since I need 32 KB of RAM and by regular RAM I only get 16 KB). My only question was if I should use those 16 KB of RAM or if I should put them into SRAM as well.

Also SRAM Expansion doesn't really need a patch. It's a simple one byte edit.
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
It doesn't just expand the SRAM, it allows you to write in RAM addresses to be saved.

I'm using the One Play Only version, but there are two others.
Originally posted by RPG Hacker
Originally posted by KilloZapit
Couldn't you reload layer 3 gfx from the rom rather then back it up?


Yes, I could, but that, for one thing, would mean I had to know exactly how that data is compressed (and then decompress it, which might take too long during gameplay) and additionally to that it wouldn't be compatible with whatever patch modifies layer 3 data. If I read from VRAM directly, however, there is no chance layer 3 modifications ever being incompatible with this.

How did you read from VRAM? Last time i checked i could only write to it D:

Also, i'm pretty sure it'll work in conjuction with the SRAM expand patch, unless you have them use conflicting SRAM addresses
From what I understand, and after trying to get it to work with Iceguy's pause menu (Which I ended up not using since it didn't do what I wanted it to) the SRAM expand patch reserves a ton of space in SRAM for each file. It starts at 700800 and multiplies down. So it looks like this.

File A - $700800
File B - $700700
File C - $700600

I'm guessing it would be the same for the two player version since there are still only 3 files. So that leaves everything from $700900-$700C00 open, which is quite a bit of space.
@ASM: Well don't worry. 64 KB (or 128 KB, which is the maximum) is a lot of space. When using 128 KB I still could use pretty much all the SRAM starting at $720000.

Originally posted by Ladida
How did you read from VRAM? Last time i checked i could only write to it D:


Use $2139/$213A. Also reading works a bit different. Before you actually start the reading process (with DMA or whatever) you first have to read a dummy byte. Here is an example:

Code
lda #$80
sta $2115
rep #$20
lda #$4000
sta $2116
lda $2139       ; Here is the dummy read
sep #$20

; DMA Code goes here


As you can see we're reading both, $2139 and $213A here. Depending on the setting of $2115 and depending on your DMA Code you want to read only one of those. Hope that helps!
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
And what exactly would the DMA code look like? I assume that the #$4000 you have is the source, so would I just, say, do something like:

LDA #$8001
STA $4320
LDA #$8000
STA $2181
LDY #$7F
STY $2183
LDA #$4000
STA $4325
LDY #$04
STY $420B

for the DMA code (assuming i wanted to DMA to RAM)
Originally posted by Ladida
LDA #$8000
STA $2181
LDY #$7F
STY $2183


$2181? $2183? What are those?

Oh well, I guess I'll just copy the code I use in my patch to backup Layer 3.

Code
	lda #$80      ; Bit 7 Set = Increment address after reading $213A
	sta $2115

	rep #$20
	lda #$4000    ; $4000 = Start of Layer 3 graphics
	sta $2116
	lda $2139     ; Dummy Read
	sep #$20

	lda #$81      ; Bit 7 = Transfer Direction (Set = PPU > RAM)
	sta $4340     ; Bit 0-2 = Transfer Mode (Two bytes, read once each)
	lda #$39      ; Since $2139/$213A is what we're reading from 
	sta $4341

	lda #$00
	sta $4342
	lda #$00
	sta $4343
	lda #$7F      ; DMA to $7F0000
	sta $4344

	rep #$20
	lda #$4000    ; Backup $4000 bytes = 16 kb
	sta $4345
	sep #$20

	lda #$10      ; Start DMA Channel 4
	sta $420B


Now in my patch it's changed a bit to only backup $0800 bytes per frame and take 8 frames in total (since a longer DMA read would cause lags). But this is basically it. You could, for example, use this with levelinitcode.asm (which runs in Force Blank) to copy Layer 3 garphics and tilemaps to $7F0000.

You see, reading from VRAM is basically the same as writing to VRAM except you need that dummy read and have to change a few settings.
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
oic, thanks :>

also, $2181 and $2183 had to do with WRAM write or something

</derailthread>
Oh, I see. Nah, you don't use that. You simply control the transfer direction over $4340. When Bit 7 is clear DMA reads from RAM and writes to PPU. This is used when writing to VRAM. When it's set, DMA reads from PPU and writes to RAM. It's as simple as that. The only tricky thing is that you can only use $2118/$2119 for VRAM writes and $2139/$213A for VRAM reads and that VRAM reads need a dummy read. If you don't know all of that you'll most likely get stuck trying to read from $2118/$2119, which of course doesn't work.

When I first started my patch it took me a long time just to find out how all of this works. I sent smkdan numerous E-Mails during that time, but usually I figured everything out before he even got to answer them (since he was only online a few times a day if at all). That really helped me understanding it, though. For lernaing something it's always better to figure it out by yourself.
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
Hi, just checked this out for the first time and watched the vid. Seems pretty amazing from what I can tell. I have a question to ask... but I didn't read most of the latest posts, so don't flame me or tell me to read... besides, this question is directed at RPG hacker, no one else.

QUESTION

Near the beginning of the vid, I saw Mario moving, was that of your control or was that part of the code doing it in that certain cutscene? If it's part of the cutscene, that is so freaking awesome, now SCORPION and I could make ACTUAL cutscenes instead just having sprites picture in and out. But, I should wait for an answer instead of getting my hopes up. Besides, from most of my reading here, seems like a majority don't like story hacks (D4C). But, I hope you release this in it's final product. Just take your time.

P.S. I am not expecting an answer from you soon, so someone who has some actual, answering, nonflamable answer can answer too. Just b/c I directed it to him doesn't mean someone with HELPFUL info can answer since his answer might be a week away.
Your layout has been removed.
Originally posted by metalgearhunter
Near the beginning of the vid, I saw Mario moving, was that of your control or was that part of the code doing it in that certain cutscene? If it's part of the cutscene, that is so freaking awesome, now SCORPION and I could make ACTUAL cutscenes instead just having sprites picture in and out. But, I should wait for an answer instead of getting my hopes up. Besides, from most of my reading here, seems like a majority don't like story hacks (D4C). But, I hope you release this in it's final product. Just take your time.


Yeah, Mario was actually controlled by me in that scene, but as far as I know there are custom blocks somewhere that control Mario's actions. I guess putting those in your level and choosing then "don't freeze sprites" option in my patch should do the job.
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
I was just thinking about something.

You know when you start a new game, and in level C5 there's a message that plays which tells the game to fade out to the overworld after a short time? Will this message still have to play, or will there be a way to make it work with the new message system? Also, couldn't you just disable the old layer 3 message box and use the RAM for the new system? That would save some free RAM.
My message system already replaces the intro and switch pallace messages. Also I don't think the original messages use any RAM. I don't see why they would need any. In any case it wouldn't be enough for my needs anyways. I need 2 x 16 kb, which is 1/4th of all the RAM available, so using SRAM really is my only option.
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
I see. So by using SRAM, you'll be able to make it compatible with other patches that use a lot of free RAM? (I use a lot of free RAM in my various patches, actually).

I'm looking forward to the release. My 'Toad Towns' are ghost towns until I can fill them with NPC's that use this patch.
Well let's reprhase it a bit: By using SRAM I even CAN get the available space. When using RAM I only get 16 kb of adjacent RAM, which is only enough to backup Layer 3, but not to do anything VWF related, so to get the other 16 kb I have no choice but to use SRAM. Since I'll have to use SRAM anyways, though, I can as well just go ahead and put everything (=32 kb of data) into SRAM to not use any free RAM at all.
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
If I may ask, what free RAM are you using at this point? That would at least help me change things now if I need to.
I'm using $7F:0000 and a patch by Kaijyuu to free them up during levels. However, by going with only SRAM I wouldn't even have to use the patch.
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
Great! I don't have to touch anything then!

I'll just sit back patiently awaiting release. :)
I assume the VWF font uses the sprite layer, right? Does the patch replace ALL the original messages, or just the intro and switch palace ones? Is it still possible to use the original Layer 3 messages? And are you planning to release this at C3?

----------------

I'm working on a hack! Check it out here. Progress: 64/95 levels.
Originally posted by imamelia
I assume the VWF font uses the sprite layer, right?


Huh? No! xD
I thought I had made it pretty obvious that this patch only uses layer 3. That is - after all - the reason I need all the RAM. To generate layer 3 graphics in it. That's also the reason why VWF is rather slow. It has to create graphics in RAM before uploading and displaying them. With sprites I wouldn't have this problem. However, I think sprites have other disadvantages. There is a limit of how many sprites can be displayed on the same scanline and even the total number of sprites is limited to only 128. On top of that - since I want to make it possible to use the VWF patch for system messages that are shown during gameplay - I can't remove the other sprites for the sake of the VWF system. Layer 3 is the best option here and probably the only real one anyways.

Originally posted by imamelia
Does the patch replace ALL the original messages, or just the intro and switch palace ones?


It doesn't really replace any messages. Instead it hijacks the routine that calls a message. Therefore anything that used a level message before (Switch Pallaces, Intro, Yoshi's House, speakers...) now uses my VWF system.

Originally posted by imamelia
Is it still possible to use the original Layer 3 messages?


In theory yes, but not out of the box. As I just said my patch overwrites the actual message calling. If you'd try to call one of the original messages it would call a VWF message instead. However, by simply commenting out a single hijack in my patch before applying it to your ROM it is possible to keep the original message calling. In that case it would still be possible to use the VWF system in combination with custom sprites, custom blocks etc.

Originally posted by imamelia
And are you planning to release this at C3?


See my custom title. :D
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!

Patch