[ Wiki | Release Lists | Patches | J-DB ]
PocketHeaven Sponsors:
[ Jandaman | DealExtreme ]



Pocket Heaven
Pocket Emulation Discussion Boards
 
    SearchSearch   MemberlistMemberlist  RSS FeedRSS Feed  RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

NEW Goomba Color ROM Builder released!
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Pocket Heaven Forum Index -> Goomba
View previous topic :: View next topic  
Author Message
marcelo
Member


Joined: 26 Nov 2004
Posts: 102
Location: Brazil

PostPosted: Mon Feb 27, 2006 12:32 pm    Post subject: NEW Goomba Color ROM Builder released! Reply with quote

NEW Goomba Color ROM Builder I wrote.
Compatible with new trim feature.
Any comments are welcome.

Download
Back to top
View user's profile Send private message MSN Messenger
kingkong
Member


Joined: 06 Jan 2006
Posts: 35

PostPosted: Tue Feb 28, 2006 1:48 pm    Post subject: Reply with quote

it looks really cool, sweet design.

and its nice how it makes the goomba.gba so it fits on a flashcard(space).

perfect would be when it would automatically trim the roms before adding Wink
Back to top
View user's profile Send private message
marcelo
Member


Joined: 26 Nov 2004
Posts: 102
Location: Brazil

PostPosted: Tue Feb 28, 2006 2:07 pm    Post subject: Reply with quote

I think itīs possible if Dwedit shares the source code of GBCTRIM. Cool
Back to top
View user's profile Send private message MSN Messenger
Dwedit
Administrator


Joined: 26 Feb 2004
Posts: 2218
Location: Chicago!

PostPosted: Tue Feb 28, 2006 2:14 pm    Post subject: Reply with quote

Disregard previous version of this post...

Here's the source to gbctrim as a VB .frm file:
Code:
VERSION 5.00
Begin VB.Form frm
   Caption         =   "GBCTrim, drag .GBC files on!"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   OLEDropMode     =   1  'Manual
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
End
Attribute VB_Name = "frm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, Y As Single)
Dim I
Dim z As String
Dim msg As VbMsgBoxResult
Dim error As Integer
For I = 1 To Data.Files.Count
    z = Data.Files(I)
    msg = MsgBox("Trim this file: " + z + "?", vbYesNo)
    If msg = vbYes Then
       MsgBox "Trimmed " + Trim(Str(TrimFile(z))) + " bytes off " + z
    End If
   
Next


End Sub

Function GetLength(Arr() As Byte)
On Error GoTo getlengtherror
    GetLength = UBound(Arr) + 1
On Error GoTo 0
    Exit Function
getlengtherror:
    GetLength = 0
    Exit Function
End Function


Sub AppendSub(Arr1() As Byte, Arr2() As Byte, Start1 As Long, Size1in As Long)
    Dim L1 As Long, L2 As Long
    Dim Size1 As Long
    Size1 = Size1in
    L1 = GetLength(Arr1)
    L2 = GetLength(Arr2)
    If (Start1 < 0) Then
        Size1 = Size1 + Start1
        Start1 = 0
    End If
    If (Start1 + Size1) > L1 Then
        Size1 = L1 - Start1
    End If
    If (Size1 < 0) Then
        Exit Sub
    End If
    Dim I As Long
    ReDim Preserve Arr2(L2 + Size1in - 1)
    For I = 0 To Size1 - 1
        Arr2(L2 + I) = Arr1(Start1 + I)
    Next
End Sub

Sub SetWord(Arr1() As Byte, Address As Long, Data As Long)
    Arr1(Address) = Data And 255
    Arr1(Address + 1) = ((Data \ 256) And 255)
    Arr1(Address + 2) = ((Data \ 65536) And 255)
    Arr1(Address + 3) = ((Data \ 16777216) And 255)
End Sub

Function TrimFile(file As String) As Long

Dim NumBanks As Long
Dim OnBank As Long
Dim BankBase As Long
Dim BankEnd As Long
Dim Outptr As Long

Dim Inptr As Long


Dim FileNum As Integer
Dim FileSize As Long
'Dim NewFileSize As Long
'Dim LastChar As Byte
'Dim GetChar As Byte
Dim OutBankSize As Long
Dim InData() As Byte
Dim OutData() As Byte

FileSize = FileLen(file)
ReDim InData(FileSize - 1)
NumBanks = FileSize \ 16384
Outptr = 8 + NumBanks * 4
ReDim OutData(Outptr - 1)

FileNum = FreeFile
Open file For Binary As FileNum
    Get FileNum, , InData
Close FileNum

For OnBank = 0 To NumBanks - 1
    'start address of bank
    SetWord OutData, 8 + OnBank * 4, Outptr
    BankBase = OnBank * 16384
    BankEnd = BankBase + 16384
    Inptr = BankEnd - 1
    Dim MatchByte As Byte
    MatchByte = InData(Inptr - 1)
    Do While (Inptr - 1 >= BankBase And InData(Inptr - 1) = MatchByte)
        Inptr = Inptr - 1
    Loop
    If Inptr <> BankBase Then
        'word align
        Inptr = Inptr - 1
        Inptr = Inptr Or 3
        Inptr = Inptr + 1
        'give back bytes
        Inptr = Inptr + 16
        If Inptr > BankEnd Then Inptr = BankEnd
    End If
    OutBankSize = Inptr - BankBase
    AppendSub InData, OutData, BankBase, OutBankSize
    Outptr = Outptr + OutBankSize
Next
'file size
SetWord OutData, 4, Outptr
SetWord OutData, 0, &H4D495254

    Open file + ".trim" For Binary As FileNum
        Put FileNum, , OutData
    Close FileNum


TrimFile = FileSize - Outptr



End Function

_________________
Here come the fortune cookies! Here come the fortune cookies!
They're wearing paper hats!
Back to top
View user's profile Send private message Visit poster's website
marcelo
Member


Joined: 26 Nov 2004
Posts: 102
Location: Brazil

PostPosted: Tue Feb 28, 2006 2:18 pm    Post subject: Reply with quote

Thank you Dwedit!!! Very Happy
I will work on it in this week!!!
Back to top
View user's profile Send private message MSN Messenger
WhiteX
Member


Joined: 14 Dec 2005
Posts: 87

PostPosted: Tue Feb 28, 2006 3:11 pm    Post subject: Reply with quote

Marcelo, zip support would be good as well, if not asking too much.
_________________
THX for DominicanZero for my ava!
Back to top
View user's profile Send private message
marcelo
Member


Joined: 26 Nov 2004
Posts: 102
Location: Brazil

PostPosted: Tue Feb 28, 2006 6:31 pm    Post subject: Reply with quote

Thatīs ok WhiteX, but I will try to work on the trim feature first.
Zip feature are comming soon in the next versions too.
Back to top
View user's profile Send private message MSN Messenger
kingkong
Member


Joined: 06 Jan 2006
Posts: 35

PostPosted: Wed Mar 01, 2006 7:11 pm    Post subject: Reply with quote

also i personally would prefer to choose from a list of roms and decide which i want to add (and hopefully trim, and then add to a goomba.gba) and it showing me the size

instead of adding a whole dir
Back to top
View user's profile Send private message
marcelo
Member


Joined: 26 Nov 2004
Posts: 102
Location: Brazil

PostPosted: Fri Mar 10, 2006 4:33 pm    Post subject: Reply with quote

I (finally) finish the trim code. Very Happy
It was the hardest part (programming language differences).
Now I am rewriting the main code to add the trim and others new functions.
I will release the new version in the next week.
Back to top
View user's profile Send private message MSN Messenger
kennyk
Member


Joined: 22 Feb 2004
Posts: 245
Location: Keelhaul Key

PostPosted: Sun Mar 12, 2006 2:06 am    Post subject: Reply with quote

Sounds great. Hope everything works out.
Back to top
View user's profile Send private message
marcelo
Member


Joined: 26 Nov 2004
Posts: 102
Location: Brazil

PostPosted: Tue Mar 14, 2006 4:31 pm    Post subject: Reply with quote

Goomba rom builder update!

Main changes:
- Built-in rom trimming
- Unzip support
- Zip output roms after compiling (optional)
- Source code open for downloading

Download
Back to top
View user's profile Send private message MSN Messenger
marcelo
Member


Joined: 26 Nov 2004
Posts: 102
Location: Brazil

PostPosted: Tue Mar 14, 2006 4:32 pm    Post subject: Reply with quote

Dwedit, when I was updating my rom builder, I observe
that goomba color freezes if I try to add a splash screen...
It is a bug, or this is disabled right now?
Back to top
View user's profile Send private message MSN Messenger
Dwedit
Administrator


Joined: 26 Feb 2004
Posts: 2218
Location: Chicago!

PostPosted: Tue Mar 14, 2006 5:10 pm    Post subject: Reply with quote

It's a bug. I never use splash screens, so I didn't notice they were broken.
_________________
Here come the fortune cookies! Here come the fortune cookies!
They're wearing paper hats!
Back to top
View user's profile Send private message Visit poster's website
marcelo
Member


Joined: 26 Nov 2004
Posts: 102
Location: Brazil

PostPosted: Wed Mar 15, 2006 11:06 am    Post subject: Reply with quote

Ok! anyways, thanks for gbc emu! that's was the reason I heave to write a rom builder! Wink
Back to top
View user's profile Send private message MSN Messenger
kingkong
Member


Joined: 06 Jan 2006
Posts: 35

PostPosted: Wed Mar 22, 2006 1:34 pm    Post subject: Reply with quote

rom builder works perfect.

maybe it can be included in next goomba color release (whenever there is one)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Pocket Heaven Forum Index -> Goomba All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
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