Author
|
Topic: DMA problem (Read 1 times)
|
mopoz
Guest
|
|
« on: December 08, 2010, 05:47:23 am » |
|
I do VWF in the game illusion fo gaia. Since the font in the game to boot, like a map tile, it had to be corrected. The problem lies in the fact that sending a new font via DMA into VRAM. In the emulator snes9x v1.51 displayed incorrectly. And in 1.52, and Geiger's debugger, Tracer, bsnes and the PSP everything works fine. What's the problem? Not the correct code or a bug emulator?
|
|
|
|
Nightcrawler
Guest
|
|
« Reply #1 on: December 08, 2010, 08:28:54 am » |
|
It's probably best if you can find someone with a copier or flash cart to confirm it works on the real hardware. That would be a definitive answer. Aside from that, BSNES is the most accurate emulator we have and pretty trustworthy in most cases. So, it's likely your code is OK and there is just a problem with SNES9x 1.51.
9 times out of 10 DMA VWF problems are attributed to not properly waiting for vblank. You cannot transfer to VRAM (or most video registers) outside of vblank. Did you wait for vblank? If you're using the game's own DMA code, this is probably not an issue unless the code executes late in the vblank period. An increase in data transferred then may not make it before vblank expires.
|
|
|
|
andrewclunn
Guest
|
|
« Reply #2 on: December 08, 2010, 02:30:02 pm » |
|
Crap, how far along are you? I've been working on an Illusion of Gaia update. I've been correcting text typos, making the voice consistent (Will sometimes thinks in the first person, sometimes his thoughts are narrated in the third, and even sometimes in the second person!), healing items and charge timing, and the goal was to add a variable width font as the final stroke. I haven't started on the VW font part yet, but if you're working on that then I'd like to make sure that my work is compatible with yours. Are you modifying the script coding at all? Is anything being moved to a new location in ROM?
|
|
|
|
Auryn
Guest
|
|
« Reply #3 on: December 08, 2010, 04:33:45 pm » |
|
If u need to test it on the real hardware, i can do that, i have a super wildcard 32MB and a profighter (i don't remember which one because longtime not used).
|
|
|
|
mopoz
Guest
|
|
« Reply #4 on: December 16, 2010, 06:05:50 am » |
|
jmp $e00000
org $e00000 REP #$20 AND #$00FF INY STA $00 rep #$30 stx regx ; old X sty regy ; old Y pha tax lda $e05000,x ; wight and #$0007 sta vwf pla ;and #$007F asl asl asl asl adc #$4000 sta $f0 lda #$00e0 sta $f2 ; e04000 = font ldy #$0000 ldx $0938; x reg for save font in ram copy: lda #$0000 sep #$20 clc lda [$f0],y ; copy 1 byte font 1bpp sta char ; lda #$ff ;lsr char sbc char ; 00010010 => 11101101 rep #$30 ;xba adc #$ff00 sta $7eF000,x iny inx inx cpy #$0010 bne copy ... jsl $e00800
;---------------- ; DMA font | ;---------------- org $e00800 rep #$30 lda $0938 ; address in VRAM sbc #$0020 clc lsr clc adc #$6800 ; $D000 address in Vram sta $2116 lda #$0020 ;The number of bytes to send in video RAM. sta $4305 lda $0938 sbc #$0020 adc #$f000 ;offsetes address in RAM sta $4302 sep #$20 lda #$7e sta $4304 lda #$80 sta $2115\t\t lda #$01 sta $4300\t\t lda #$18 sta $4301\t\t lda #$01\t\t sta $420b
vb: lda $4212 ; check Vblank bpl vb rtl
Text output, but with a delay of ~ 1 second.
|
|
|
|
mopoz
Guest
|
|
« Reply #5 on: January 20, 2011, 10:03:04 am » |
|
|
|
« Last Edit: January 20, 2011, 12:18:21 pm by mopoz »
|
|
|
|
RedComet
Guest
|
|
« Reply #6 on: January 20, 2011, 10:53:57 am » |
|
Congratulations! Everyone remembers their first forever.
|
|
|
|
justin3009
Guest
|
|
« Reply #7 on: January 20, 2011, 11:58:32 am » |
|
Woah. Adding a VWF to a game is something I want to learn very soon. Seeing you guys pulling this off with success is truly inspiring
|
|
|
|
Nightcrawler
Guest
|
|
« Reply #8 on: January 20, 2011, 01:51:22 pm » |
|
Looks nice! Congrats! I know you want Illusion of Gaia, but you may want to make a small project out of this game too. If you reformat the text to use the extra window space you now have, you can release a nice Bof improvement patch that I'm sure a number of people would appreciate. Two questions: Where did you get the font you used? How come you got rid of the text window background color?
|
|
|
|
mopoz
Guest
|
|
« Reply #9 on: January 20, 2011, 02:08:34 pm » |
|
Font I took from DQ3. Thank you, DaMarsMan, I think he is not offended. =) I replaced the background, changing the register # $ 2003 (blue), while filling the window. I have yet to be fully not finish, still need to post the menu and battles. There used 4bpp, for a place 2bpp. What about the window. I want to add more h-dma, to look beautiful. What about the patch. I rewrote for hacking the ROM hirom, so it was convenient. Changed the system S-ram. Because in Hirom address $ 30:6000. But as completed yet, will put a patch, it will be a good occasion to re-translation.
|
|
|
|
Nightcrawler
Guest
|
|
« Reply #10 on: January 20, 2011, 03:16:02 pm » |
|
Sounds great! You're well on you way to becoming a superstar! :woot!:
|
|
|
|
mopoz
Guest
|
|
« Reply #11 on: January 21, 2011, 08:23:33 am » |
|
Damn! Only appears in one frame and disappears. In geiger's debug log do H-DMA, sends data only once per dialog. Although the cycle is repeated not once. But does not send data .. Put rti, but after the run, the results from the vector to any address. Who knows, tell me.
|
|
|
|
Nightcrawler
Guest
|
|
« Reply #12 on: January 21, 2011, 11:05:31 am » |
|
I'm not sure I totally understand due to the language barrier. But: I assume you put your HDMA code inside the NMI routine and that's where the RTI statement is? It needs to execute (or at least initiate the HDMA) there to work every frame. Try using VSNES. Take a savestate during the frame where things are working properly and then take another when they are not. You can then load them up in VSNES and compare your HDMA/DMA channels and setups there. That would point you in the right direction of what changed. When you know what changed, you can use that information to look for code or breakpoints in the debugger to find the offending code. Being that you say it worked for a frame, I imagine either your HDMA is only actually being executed one time, or some other code overwrote the registers for some other DMA/HDMA use. I'm a little rusty with my HDMA. Anybody else have any other insight to add?
|
|
|
|
mopoz
Guest
|
|
« Reply #13 on: January 21, 2011, 01:08:08 pm » |
|
Uh ... When put to the procedure in the NMI, it makes my terms in the h-dma, but not the data themselves do not go into the process of implementation. Does not even show that my channels are used. When I put the procedure in the code output window, it shows one frame. =) What about the free channels. I'm using 6 and 7 in the game all goes only 0 channel. Well, the first channel my VWF. I analyzed the game with other H-dma, but did not understand the essence of the situation. P.S. I have a session, I did not prepare for the exams, I sit here and hack. January 22, 2011, 01:18:53 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Oh, damn! I do it's!!! :crazy: :crazy: :crazy: So far, only transparency. Another line Colors Experiment.
|
|
« Last Edit: January 22, 2011, 01:18:53 pm by mopoz »
|
|
|
|
justin3009
Guest
|
|
« Reply #14 on: January 22, 2011, 02:36:31 pm » |
|
Very nice job
|
|
|
|
|