| 
 
	
		| View previous topic :: View next topic |  
		| Author | Message |  
		| EsperKnight Member
 
  
 
 Joined: 11 Jun 2009
 Posts: 21
 Location: VA, USA
 
 | 
			
				|  Posted: Mon Apr 05, 2010 9:15 pm    Post subject: |   |  
				| 
 |  
				| That's what I'm afraid of Tom   
 I'm gonna look at doing it tonight.  Sorry I haven't been on IRC in a while, been to tired taking care of my son but he seems to be on a schedule so I'm slowly trying to get back into things.
 
 I'm thinking it also could be due to an interrupt happening in the middle of it... I can't remember if I asked you or Dave (I'm guessing Dave
  but gonna try putting in a sei and whatever the other one is to disable them *crosses fingers* 
 It works great on Mednafen and I guess any other emulator at least
  |  |  
		| Back to top |  |  
		|  |  
		| EsperKnight Member
 
  
 
 Joined: 11 Jun 2009
 Posts: 21
 Location: VA, USA
 
 | 
			
				|  Posted: Mon Apr 05, 2010 9:25 pm    Post subject: |   |  
				| 
 |  
				| And I prob should go into detail on what I did (it's actually a pretty generic routine   
 I have a copy of the $E060 bios routine that I have located in a bank that's always loaded (or should be... it's actually the bank the text routine is in
  .  Nothing has been changed in this except for positioning of where to get the font at (which is located in this same bank) (I need to slim it down but I'm lazy..   
 It runs through this to pull letters.  It does EXACTLY the same thing as the normal one does 'cept get the font from a different place.  After this runs it stores the letter in RAM.
 
 The next routine I call is before the print to screen routine which grabs this letter, shift however much it needs to be shifted to the right to fit it on the tile with the previous letter.  It also saves the overflow into a space in RAM really far in so hopefully I won't overwrite anything *crosses fingers*.  This code also increments the tile itself if need be.
 
 It then calls in the regular print routine with the modification in that it doesn't increment the tile position (only the routine above does).
 
 The only other routine that's called is the end of line routine which passes in a space to my custom $E060 routine which then runs through the above, this ensures the last bit of the letter gets printed off before moving to the next line (laziness for the win!
   
 And that's it.  Nice and simple
  I don't mess with any of the printing stuff (setting VDC or anything like that).  Figure it can handle that for me   
 Oh yeah!  The only other thing I added was the ability to use ASCII, it converts ASCII to SJIS.
 
 Doug
 |  |  
		| Back to top |  |  
		|  |  
		| EsperKnight Member
 
  
 
 Joined: 11 Jun 2009
 Posts: 21
 Location: VA, USA
 
 | 
			
				|  Posted: Tue Apr 06, 2010 12:43 pm    Post subject: |   |  
				| 
 |  
				| Below is my E060 code and VWF code and EOL code.  Anyone can use this so feel free.  Just wouldn't mind a mention if you do.  Also the VWF code is somewhat specific in the beginning but  mostly it's generic.  Any questions feel free to ask   
 Tom, if you see anything below that sticks out that may cause the issues on the real hardware lemme know, thanks!
 
 Also this adds the SEI/CEI instructions, hopefully that'll fix it
   
 
 
 ; A898 is the one used by the location text...
 
 ; Reminder this starts at 2A30000 on the ISO
 
 ; Modify C9F6 to 2006DC
 
 .org $D000
 
 .incbin "cfont.dmp"
 
 EX_GETFNT:
 
 ; starts at f124 in syscard3.pce
 
 JSR start
 
 ; below is where it loads the bank to pull the letter, as well as the compression portion
 load_letter:
 BCC no_error
 LDA #$01
 RTS
 
 no_error:
 LDA #$d0
 STA <$fc
 LDA <$fb
 SEC
 SBC #$a0
 BPL backup_3_4
 
 backup_5_6:
 NOP
 BRA MM_backed_up
 
 backup_3_4:
 LDA #$d0
 STA <$fc
 NOP
 STA $22b9
 
 MM_backed_up:
 LDA <$f8
 STA <$ec
 LDA <$f9
 STA <$ed
 STZ <$ee
 BBR0 <$ff, uncompressed_font ; branches here to the uncompressed vers?
 
 compressed_font:
 LDX #$08
 
 
 mult_8:			  ; sets up low byte of where the letter is at in the table
 CLC
 LDA <$ec
 ADC <$f8
 STA <$ec
 LDA <$ed
 ADC <$f9
 STA <$ed
 CLA
 ADC <$ee
 STA <$ee
 DEX
 BNE mult_8
 ASL <$ec
 ROL <$ed
 ROL <$ee
 BRA fin_mult
 
 uncompressed_font:
 LDX #$05
 
 mult_EC:
 ASL <$ec
 ROL <$ed
 ROL <$ee
 DEX
 BNE mult_EC
 
 fin_mult:
 LDA <$ff
 ASL a
 INC a
 ADC <$ee
 STA <$ee
 LDA <$ed
 LDX #$05
 
 mult_EE:
 LSR <$ee
 ROR a
 DEX
 BNE mult_EE
 
 STA <$ee
 LDA <$ed
 AND #$1f
 CLC
 ADC <$fc
 STA <$ed
 LDA <$ee
 BBS7 <$fc, tam_5_6 ; branches here to load up proper banks, this will change...
 
 tam_3_4:
 NOP
 BRA loaded_MM
 
 tam_5_6:
 NOP
 loaded_MM:
 BBS0 <$ff, is_compressed
 CLY
 
 load_uncfont:
 LDA [$ec], Y
 STA [$fa], Y
 INY
 CPY #$20
 BNE load_uncfont
 BRA fin_uncfont
 
 is_compressed:
 JSR compressed
 
 fin_uncfont:
 BBS7 <$fc, reset_5_6
 
 reset_3_4:
 NOP
 BRA skip_TAM
 
 reset_5_6:
 NOP
 
 skip_TAM:
 CLA
 JMP vwf_code ; yay, we loaded our letter, were done...
 
 ; below is where we calculate our index
 ; for us, were using the compressed 16x16 font
 ; which is 0x11 long for each letter
 start:
 LDA <$f9
 SEC
 SBC #$81
 CMP #$6f
 BCS invalid_letter; checks high high byte (which'll be $81 or $82 for Eng)
 CMP #$1f
 BCC valid_letter; this should always jump here...
 CMP #$3f
 BCC invalid_letter ; checks high high byte (which'll be $81 or $82 for Eng)
 SBC #$40
 
 valid_letter:
 ASL a
 ADC #$21
 STA <$f9
 LDA <$f8
 SEC
 SBC #$40
 CMP #$bd
 BCS invalid_letter ; low byte check
 CMP #$3f
 BEQ invalid_letter ; low byte check
 BCS dont_inc
 INC a
 
 dont_inc:
 CMP #$5f
 BCS valid_letter1 ;
 CLC
 ADC #$20
 BRA valid_letter2 ;
 
 invalid_letter:
 SEC
 RTS
 
 valid_letter1:
 INC <$f9
 SEC
 SBC #$3e
 
 valid_letter2:
 STA <$f8
 LDA <$f9
 CMP #$23 ; this one is for $82
 BEQ eq_23
 CMP #$26
 BEQ eq_26
 CMP #$27
 BEQ eq_27
 CMP #$28
 BCC eq_28
 CMP #$30
 BCC invalid_letter ; checks high high byte (which'll be $81 or $82 for Eng)
 CMP #$50
 BCS invalid_letter ; checks high high byte (which'll be $81 or $82 for Eng)
 SEC
 SBC #$08
 BRA eq_28 ; guessing eq_28 is the default in case it gets through the rest... seems to be for $81
 
 eq_23:
 LDA <$f8
 CMP #$61
 BCC skip_sbc_06
 SBC #$06
 
 skip_sbc_06:
 CMP #$41
 BCC skip_sbc_07
 SBC #$07
 
 skip_sbc_07:
 SEC
 SBC #$0f
 BRA done_w_F8
 
 eq_26:
 LDA <$f8
 CMP #$41
 BCC done_w_F8
 SBC #$08
 BRA done_w_F8
 
 eq_27:
 LDA <$f8
 CMP #$51
 BCC done_w_F8
 SBC #$0f
 
 done_w_F8:
 STA <$f8
 LDA <$f9
 
 eq_28:
 SEC
 SBC #$21
 ASL a
 TAY
 LDA <$f8
 SEC
 SBC #$21
 CLC
 ADC $f27e, Y
 STA <$f8
 LDA $f27f, Y
 ADC #$00
 STA <$f9
 CLC
 RTS
 
 ; yup, an index table smack dab in the middle of the code
 .incbin "font_index.bin"
 
 compressed:
 CLY
 
 start_unc:
 LDA [$ec], Y
 INY
 BSR store_byte
 LDA [$ec], Y
 INY
 PHA
 AND #$f0
 BSR store_byte
 LDA [$ec], Y
 INY
 STA $22bd
 PLA
 LDX #$04
 
 shift:
 ASL $22bd
 ROL a
 DEX
 BNE shift
 
 BSR store_byte
 LDA $22bd
 AND #$f0
 BSR store_byte
 CPY #$12
 BCC start_unc
 CLA
 LDY #$07
 
 store_two_bottom:		; this stores the two bottom rows, it actually does at least 3 but goes
 ; the $20 bytes of the font
 STA [$fa], Y
 DEY
 BPL store_two_bottom
 RTS
 
 store_byte:
 STA [$fa]
 INC <$fa
 BNE skip_inc
 INC <$fb ; from what i can tell this is never used...
 
 skip_inc:
 RTS
 
 -----------------------------------
 vwf_code:
 SEI
 
 LDA $3FDF ; current position
 CMP #$10
 BCC init
 
 AND #$0F
 STA $3FDF ; current position
 
 CLC
 LDA $C14F
 ADC #$40
 STA $C14F
 LDA $C150
 ADC #$00
 STA $C150
 
 
 ; Set current tile
 LDA #$04
 CLC
 ADC $C151
 STA $C151
 LDA $C152
 ADC #$00
 STA $C152
 
 ; Set current position on screen
 LDA #$02
 CLC
 ADC $60F3
 STA $60F3
 
 
 LDX #$00
 clear_backup:
 STZ $3F70,X ; letter
 INX
 TXA
 CMP #$20
 BEQ finish_clear
 JMP clear_backup
 finish_clear:
 CLX
 ;LDA $C14F
 ;BEQ init
 ;SBC #$20
 ;STA $C14F
 ;INC ($33ED)
 ;INC ($33ED)
 
 
 init:
 LDX #$02
 
 start_vwf:
 STZ $3EDD ; temp shifted off overflow
 STZ $3EDE ; temp shifted off overflow
 LDY $3FDF ; current position
 CLC
 
 shift_vwf:
 BEQ end
 ROR $C153,X ; letter
 INX
 ROR $C153,X ; letter
 DEX
 ROR $3EDD ; temp shifted off overflow
 ROR $3EDE ; temp shifted off overflow
 DEY
 JMP shift_vwf
 
 end:
 LDA $C153,X ; letter
 ORA $3F50,X ; shifted off overflow
 STA $C153,X ; letter
 INX
 
 LDA $C153,X ; letter
 ORA $3F50,X ; shifted off overflow
 STA $C153,X ; letter
 DEX
 
 LDA $3EDD ; temp shifted off overflow
 STA $3F50,X ; shifted off overflow
 INX
 
 LDA $3EDE ; temp shifted off overflow
 STA $3F50,X ; shifted off overflow
 INX
 
 TXA
 CMP #$20
 BEQ finish
 JMP start_vwf
 
 finish:
 CLC
 LDA $3FDF ; current position
 ADC $C153 ; letter size
 STA $3FDF ; current position
 ;LDA $33ED ; ?
 ;STA <$7D  ; ?
 ;STZ $C153 ; letter size
 
 ;  Below we start our code to backup the current letter
 
 
 LDX #$02
 curr_let_backup:
 LDA $3F70,X ; letter
 ORA $C153,X ; shifted off overflow
 STA $3F70,X ; letter
 INX
 TXA
 CMP #$20
 BEQ finish_store
 JMP curr_let_backup
 finish_store:
 CLX
 store:
 LDA $3F70,X ; letter
 STA $C153,X ; shifted off overflow
 INX
 TXA
 CMP #$20
 BEQ fin
 JMP store
 fin:
 CLI
 
 RTS
 
 ------------------------
 
 ; Below is my hack for the newline... *crosses fingers*
 
 ;JSR vwf_code
 
 ; This modifies C532 in game when doing a new line, modify to JSR $DE83 (or so) : 20 83 DE
 
 LDA #$40
 STA $c148
 LDA #$81
 STA $C149
 JSR $C9E0
 LDA #$00 ; Take our tab character...
 RTS
 |  |  
		| Back to top |  |  
		|  |  
		| Tomaitheous Elder
 
  
 
 Joined: 27 Sep 2005
 Posts: 306
 Location: Tucson
 
 | 
			
				|  Posted: Wed Apr 07, 2010 4:34 am    Post subject: |   |  
				| 
 |  
				|  	  | EsperKnight wrote: |  	  | I'm thinking it also could be due to an interrupt happening in the middle of it... I can't remember if I asked you or Dave (I'm guessing Dave
  but gonna try putting in a sei and whatever the other one is to disable them *crosses fingers* 
 | 
 
 There's a problem with this. You don't know if the code that originally lead to the print routine already did SEI or not. It's an unknown state you'd have to test for. I mean, you might not want to CLI if the part of the code needs to stay in SEI mode.
 
 Here's the work around:
 
 PHP
 SEI
 NOP
 
 .
 .
 .
 .
 PLP <-at the end
 
 If you replaced the VRAM upload routine or are calling it, might want to do the above and see what happens. You don't want it for ALL of your print routine - just the part that writes to the VDC.
 
 That's a safe approach and you don't need to know the state of the I flag before hand. But, your problem could be any one or a combination of things.
 
 Also, if you have data in a different bank that you're accessing from your code bank - interrupt routines can change this on you, etc. So disabling interrupts, mapping in the bank even if it seems there all the time, is good debugging practice (I had this problem with Cosmic Fantasy 4 - both chapters that I did an generic roman print routine for. Sometime the bank that was supposed to be there - wasn't and would cause the game to freeze. Or corrupt. I saved the bank I wanted onto the stack, then mapped in the bank that would normally be there just in case. Fixed the problem).
 _________________
 www.pcedev.net
 |  |  
		| Back to top |  |  
		|  |  
		| duke4711 Regular
 
  
 
 Joined: 19 Nov 2004
 Posts: 84
 
 
 | 
			
				|  Posted: Wed Apr 07, 2010 4:54 am    Post subject: |   |  
				| 
 |  
				| I finally got my copy of the game, and I used Nightwolve's Turborip to rip the game to my hard disc, and I applied the patch with no difficulty at all. I only had time to play it for about 30 minutes, and from what I could see so far, it is a truly great game, and the translation looks great too. Tru, I want to thank you and everyone else involved once again for doing such an excellent job on the translation. You are a gentleman and a scholar. Also, I have one question for anyone who knows. I'm not sure if one exists, but is there a text file anywhere that translates the spoken dialogue, like the one for Ys IV? Thanks in advance. |  |  
		| Back to top |  |  
		|  |  
		| M1Savage Member
 
  
 
 Joined: 26 May 2002
 Posts: 26
 
 
 | 
			
				|  Posted: Wed Apr 07, 2010 1:41 pm    Post subject: |   |  
				| 
 |  
				|  	  | duke4711 wrote: |  	  | ... Also, I have one question for anyone who knows. I'm not sure if one exists, but is there a text file anywhere that translates the spoken dialogue, like the one for Ys IV? Thanks in advance. | 
 
 That's something I'd like to see too!
  |  |  
		| Back to top |  |  
		|  |  
		| Tru Regular
 
  
 
 Joined: 09 May 2003
 Posts: 170
 Location: SomeWhere
 
 | 
			
				|  Posted: Wed Apr 07, 2010 4:06 pm    Post subject: |   |  
				| 
 |  
				|  	  | M1Savage wrote: |  	  |  	  | duke4711 wrote: |  	  | ... Also, I have one question for anyone who knows. I'm not sure if one exists, but is there a text file anywhere that translates the spoken dialogue, like the one for Ys IV? Thanks in advance. | 
 
 That's something I'd like to see too!
  | 
 
 Definately a possibility... but I think since this patch was done through machine translation, I will hold out until we get the human translation... it would avoid any confusion with a conflicting storyline...
 
 Glad you like it duke4711 and everyone else...
 _________________
 There are only 2 races on this planet... the Intelligent and the Stupid...
 |  |  
		| Back to top |  |  
		|  |  
		| EsperKnight Member
 
  
 
 Joined: 11 Jun 2009
 Posts: 21
 Location: VA, USA
 
 | 
			
				|  Posted: Wed Apr 07, 2010 5:57 pm    Post subject: |   |  
				| 
 |  
				| Hey Tom, Sounds good I'll try some of that.  I haven't changed any of the print routine (we'll, minor changes.  Basically I took out the increase of the position that it called).
 
 I'll try those suggestions as well...
 
 I'll try getting on IRC tonight as well depending on how tired I am (staying up a bit late getting some other projects going too... Lady Sword anyone?
  ) to chat with you about this too.  If you want I can send you the iso with the changes on it so you can see it in action on your end as well, can't hurt as maybe you'll see something you recognize from your previous encounters with this stuff (never know  ).  Thanks! |  |  
		| Back to top |  |  
		|  |  
		| Tru Regular
 
  
 
 Joined: 09 May 2003
 Posts: 170
 Location: SomeWhere
 
 | 
			
				|  Posted: Wed Apr 07, 2010 9:58 pm    Post subject: |   |  
				| 
 |  
				|  	  | EsperKnight wrote: |  	  | (staying up a bit late getting some other projects going too... Lady Sword anyone? | 
 
 
  Good project... one I would love to see myself! _________________
 There are only 2 races on this planet... the Intelligent and the Stupid...
 |  |  
		| Back to top |  |  
		|  |  
		| dudule Visitor
 
  
 
 Joined: 07 Apr 2010
 Posts: 1
 
 
 | 
			
				|  Posted: Wed Apr 07, 2010 10:25 pm    Post subject: |   |  
				| 
 |  
				| thank you, it's good job  |  |  
		| Back to top |  |  
		|  |  
		| Peperocket Member
 
  
 
 Joined: 20 Apr 2005
 Posts: 30
 
 
 | 
			
				|  Posted: Mon Apr 12, 2010 11:46 am    Post subject: |   |  
				| 
 |  
				| Thank you very much for this translation, it's a very good work !! |  |  
		| Back to top |  |  
		|  |  
		| duke4711 Regular
 
  
 
 Joined: 19 Nov 2004
 Posts: 84
 
 
 | 
			
				|  Posted: Wed Apr 14, 2010 3:08 am    Post subject: |   |  
				| 
 |  
				| Hey Tru, I found some untranslated dialogue that I thought you should know about. I wish I would have remembered to take a screen shot. Anyway, it's in the part where you first talk to King Kyle right before the other guy comes running in. There are about four untranslated screens. Other than that, the whole thing has been great. It's a good game with a good story so far. |  |  
		| Back to top |  |  
		|  |  
		| bernielindell Regular
 
  
 
 Joined: 04 Mar 2008
 Posts: 149
 
 
 | 
			
				|  Posted: Wed Apr 14, 2010 10:52 am    Post subject: |   |  
				| 
 |  
				|  	  | duke4711 wrote: |  	  | Hey Tru, I found some untranslated dialogue that I thought you should know about. I wish I would have remembered to take a screen shot. Anyway, it's in the part where you first talk to King Kyle right before the other guy comes running in. There are about four untranslated screens. Other than that, the whole thing has been great. It's a good game with a good story so far. | 
 
 Have you applied the updated patch to your ISO?  Check out the first post in this thread.
 |  |  
		| Back to top |  |  
		|  |  
		| duke4711 Regular
 
  
 
 Joined: 19 Nov 2004
 Posts: 84
 
 
 | 
			
				|  Posted: Wed Apr 14, 2010 10:34 pm    Post subject: |   |  
				| 
 |  
				| I didn't even know about the update until now. But I got it now, thanks! |  |  
		| Back to top |  |  
		|  |  
		| cosmos99 Visitor
 
  
 
 Joined: 20 Apr 2010
 Posts: 2
 
 
 | 
			
				|  Posted: Sun Apr 25, 2010 6:39 pm    Post subject: |   |  
				| 
 |  
				| Many thanks for the translation ! Could you answer your PM please Tru ? |  |  
		| Back to top |  |  
		|  |  
		|  |  
  
	| 
 
 | You cannot post new topics in this forum You cannot reply to topics in this forum
 You cannot edit your posts in this forum
 You cannot delete your posts in this forum
 You cannot vote in polls in this forum
 
 |  
 Powered by phpBB © 2001, 2005 phpBB Group
 
 |