Final fantasy 4, 5 & 6: PSX FMV inclusion as MSU1 videos

View previous topic View next topic Go down

Final fantasy 4, 5 & 6: PSX FMV inclusion as MSU1 videos

Post by TheShadowRunner on Sun 19 Feb 2017 - 16:15

Hey all,
I believe I saw a github repository in the past for such a project: include the PSX Intro and Ending FMVs of FFIV,V & VI as MSU1 videos.
But for the life of me I cannot find this github/link again.
Did this project disappear in oblivion or am I imagining things?  Ohmygod
avatar
TheShadowRunner
Leever
Leever

Since : 2015-06-26

Back to top Go down

Re: Final fantasy 4, 5 & 6: PSX FMV inclusion as MSU1 videos

Post by SePH on Sun 26 Feb 2017 - 21:07

Here's the one for FFIV.

And here's something for FFVI!



Here's DancingMad bitbucket:
https://bitbucket.org/insidious611/dancingmad

There's probably more out there, but that's all I could find on short notice. Not too sure if those packs include psx msu videos through.
avatar
SePH



Since : 2012-06-19

Back to top Go down

Re: Final fantasy 4, 5 & 6: PSX FMV inclusion as MSU1 videos

Post by TheShadowRunner on Sun 26 Feb 2017 - 22:57

Thank you, that's indeed the FFIV github I saw in the past!
But while it says "Currently the Introductory sequence (before the main menu) and the opening
cutscene are implemented.", I've no clue how to build that from the available data in the github.
Can a dev make sense of it?
avatar
TheShadowRunner
Leever
Leever

Since : 2015-06-26

Back to top Go down

Re: Final fantasy 4, 5 & 6: PSX FMV inclusion as MSU1 videos

Post by SePH on Tue 28 Feb 2017 - 4:42

The code is written in the "snes-cpu" syntax for byuu's BASS-Assembler.

I'm assuming you have to download all the asm files and apply the main.asm and sound.asm files to your rom using the bass assembler.

Look in the main.asm file for exemple:

https://raw.githubusercontent.com/jbaiter/ff4msu/master/src/main.asm

Code:
//bass
mapper lorom

// Entry poins for videos
org $008003         // Before title screen
    jml main::title_entry

org $019b06         // New game from title screen
    jml main::intro_entry

org $019911         // New game from save screen
    jml main::intro_entry

org $00c592
    jml main::outro_entry

incsrc "data.asm"

org $0ef100
incsrc "dma.asm"
incsrc "joypad.asm"
incsrc "handlers.asm"
incsrc "setup.asm"
incsrc "msu.asm"
incsrc "helpers.asm"
incsrc "fadeout.asm"

namespace main

define return_point $103e   // $00: title; $01: intro; $02: finale
define current_track $1040

title_entry:
    rep #$20
    lda #$0000
    sta {msu::vid_seek_bank}
    lda #$0000
    sta {msu::vid_seek_addr}
    lda #$0000
    sta {msu::audio_track}
    jsr init::backup_registers
    sep #$20
    lda #$00
    sta {return_point}
    jml main

intro_entry:
    rep #$20
    lda #$0a8e
    sta {msu::vid_seek_bank}
    lda #$f405
    sta {msu::vid_seek_addr}
    lda #$0001
    sta {msu::audio_track}
    jsr init::backup_registers
    sep #$20
    lda #$01
    sta {return_point}
    jml main

outro_entry:
    rep #$20
    lda #$0d36
    sta {msu::vid_seek_bank}
    lda #$380a
    sta {msu::vid_seek_addr}
    lda #$0002
    sta {msu::audio_track}
    jsr init::backup_registers
    sep #$20
    lda #$02
    sta {return_point}
    jml main

main:
    rep #$20
    lda #$027f  // our routines are at $0200, so we move the stack
    tcs
    sep #$20
    lda #$00    // Set direct bank to 00
    pha
    plb
    jsr msu::check
    lda {msu::msu_present}
    cmp #$00
    beq end
    stz $4200   // inhibit IRQs
    jsr init::handlers
    jsr dma::killdma
    // TODO: Why wait 10 frames?
    jsr helpers::waitblank
    jsr helpers::waitblank
    jsr helpers::waitblank
    jsr helpers::waitblank
    jsr helpers::waitblank
    // TODO: Skip this if we're not at the title video
    jsr init::snes
    lda #$01
    sta $420d   // fast cpu
    jsr init::gfx
    jsr init::colortest
    jsr init::hdma
    jsr init::screen

    // If we're playing the intro or outro, we need to tell the
    // sound engine to play the 'empty' song, else the gamesound
    // and videosound will overlap
    lda {return_point}
    cmp #$00
    beq {+}
    jsr ost_check
    lda #$05
    sta $1e01
    lda #$01
    sta $1e00
    jsl $048004

+;  sep #$20
    jsr msu::init
    cli
    jsr msu::main
    sei
    jsr cleanup
    jmp end


cleanup:
    jsr init::clear_oam_tables
    jsr init::clear_vram
    jsr dma::killdma
    rts

end:
    jsr init::restore_registers
    rep #$10
    sep #$20
    lda {return_point}
    cmp #$00
    beq title_return
    cmp #$01
    beq intro_return
    cmp #$02
    beq finale_return
title_return:
    jml $008007
intro_return:
    jml $019b17
finale_return:
    jsl $13fffd
    jml $00c596

ost_check:
    print "ost_check {$}"
    rep #$10
    lda #$34
    sta $1e01
    sta {current_track}
    lda #$01
    sta $1e00
    jsl $048004
    ldx #$0000
    print "ost_check_2 {$}"
-;  jsr helpers::waitblank
    lda #%11100000
    sta $2122
    lda #%00000000
    sta $2122
    inx
    cpx #$04b0
    bne {-}
    print "fuckkkkrrrrr {$}"
    lda {current_track}
    inc
    sta $1e01
    sta {current_track}
    lda #$01
    sta $1e00
    jsl $048004
    ldx #$0000
    bra {-}

Look more specifically at these lines of code in the main.asm file:

incsrc "data.asm"

org $0ef100
incsrc "dma.asm"
incsrc "joypad.asm"
incsrc "handlers.asm"
incsrc "setup.asm"
incsrc "msu.asm"
incsrc "helpers.asm"
incsrc "fadeout.asm"

...those lines of code are bundling all the other project files when you apply the main.asm file. The only other asm file which isn't bundled together is the sound.asm file, so I'm thinking this one needs to be applied separately.

command to apply ASM to ROM is:

bass -o romfile.smc asmfile.asm

...so in this case it would be something like:

bass -o romfile.smc main.asm

and

bass -o romfile.smc sound.asm

Get bass here: http://www.bwass.org/bucket/Bass_v14_(Assembler_by_byuu).zip

Hopefully someone can make an ips patch of this project so it's easier to apply for others Smile
avatar
SePH



Since : 2012-06-19

Back to top Go down

Re: Final fantasy 4, 5 & 6: PSX FMV inclusion as MSU1 videos

Post by TheShadowRunner on Tue 28 Feb 2017 - 18:03

Thanks for clearing this up but there's still a mystery, even after building the patch and eventually patching the ROM, where are the video files?
Seems like the most important is just missing from the repository xD
avatar
TheShadowRunner
Leever
Leever

Since : 2015-06-26

Back to top Go down

Re: Final fantasy 4, 5 & 6: PSX FMV inclusion as MSU1 videos

Post by SePH on Tue 28 Feb 2017 - 23:53

I'm sorry, I didn't give this a proper try! :-)

You might want to try to contact the author directly if he can give you more details. I know it's been five years since his last commit on this github project, but he seem to have been much active in other projects, so there's hope you'll get an answer I guess!

https://github.com/jbaiter

johannes.baiter@gmail.com
avatar
SePH



Since : 2012-06-19

Back to top Go down

Re: Final fantasy 4, 5 & 6: PSX FMV inclusion as MSU1 videos

Post by TheShadowRunner on Thu 2 Mar 2017 - 0:54

No worries ^^;
I sent him a message, I'll update this thread if I get news!
avatar
TheShadowRunner
Leever
Leever

Since : 2015-06-26

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum