Jump to content


Photo

Coming Soon...


  • Please log in to reply
15 replies to this topic

#1 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 31 May 2004 - 11:53 PM

OK, first topic... memory buffers.

I haven't tested the routines yet, but implimented for the next WIP are:

CreateBuffer <Handle> <Size>
ReadToBuffer <FileHandle> <BufferHandle> [<Offset> [<Length>]]
WriteFromBuffer <FileHandle> <BufferHandle> [<Offset> [<Length>]]
GetBufferByte <Variable> <BufferHandle> <Offset>
GetBufferWord <Variable> <BufferHandle> <Offset> [<Endian>]
GetBufferDWord <Variable> <BufferHandle> <Offset> [<Endian>]
GetBufferString <Variable> <BufferHandle> <Offset>

SetBufferByte <BufferHandle> <Offset> <Value>
SetBufferWord <BufferHandle> <Offset> <Value> [<Endian>]
SetBufferDWord <BufferHandle> <Offset> <Value> [<Endian>]
SetBufferString <BufferHandle> <Offset> <Value>


The idea is that you can read and write binary to and from files.... and internet connections.


Coming shortly (not impleimented yet):

OpenConnection <Handle> <Server> <Port>

The internet connection handle will work with file commands. Read and write to your heart's content. wink.gif This is why the binary "memory buffer" stuff is now in there.

Think:

Roll your own FTP clients.
IRC clients
E-Mail clients.

...


After seeing what you guys can do with ActionScripting, I think these clients should be easily "doable" - I just have to code up the sockets code into the ActionScript stuff.





#2 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 01 June 2004 - 12:25 AM

Cool, but whey are the functions named 'buffer' etc. Where does Buffer come from?

Anywho I think it'll be cool to be able to patch current xbe protection measures within MXM.



#3 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 01 June 2004 - 12:36 AM

QUOTE (flattspott @ May 31 2004, 09:25 PM)
Cool, but whey are the functions named 'buffer' etc. Where does Buffer come from?

Anywho I think it'll be cool to be able to patch current xbe protection measures within MXM.

Well, because you are creating a memory buffer. To patch a file, you'll ReadToBuffer from a file, and WriteFromBuffer to another file.

Likewise, for transfering data over the internet, for example, in an FTP client, you'll create a buffer to move the data between a file on the HD and the internet socket connection.


The routines are somewhat protected... you shouldn't be able to "set" any value outside of the range. The [<Endian>] argument is just a value to change the "endian-ness" of the number - that is, the bytes of a WORD (16-bits) or DWORD (32-bits) are reversed if this is set to a value other than zero.

Strings will be written up to the end of the buffer, not beyond them - likewise, reading strings in won't read past the end of the buffer, either.


I haven't tested them yet.... I'll try and do a release as soon as the sockets stuff is in there. ReadFileLn and WriteFileLn should also be able to work with the sockets connection. Sockets "Connections" will be writeable and readable. These are TCP Streaming connections.

I may also do something to send/recieve UDP packets. We'll see (feel free to suggest your own commands for that, including any suggestions for listening for new connections (possibly implimented like the UI interface).


CODE


OpenConnection MyInetSocket user.someserver.com 645
CreateBuffer TempBuff 4096
SetBufferString TempBuff 0 "This is a test"
WriteFromBuffer MyInetSocket TempBuff 0 4096
CloseHandle MyInetSocket
CloseHandle TempBuff


Edited by BenJeremy, 01 June 2004 - 12:39 AM.


#4 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 01 June 2004 - 01:34 AM

So does this mean that with the OpenConnection stuff we can do an FTP Client?

Edited by flattspott, 01 June 2004 - 01:35 AM.


#5 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 01 June 2004 - 02:19 AM

QUOTE (flattspott @ May 31 2004, 10:34 PM)
So does this mean that with the OpenConnection stuff we can do an FTP Client?

Exactly.... open one connection up as the FTP command channel, and use ReadFileLn and WriteFileLn to pass instructions and responses, and open data connections as needed to pass files back and forth.

Telnet and IRC should be easy enough as well.


I expect an XLink Kai client could be built easily enough, too.

#6 koldfuzion

koldfuzion

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,480 posts

Posted 01 June 2004 - 03:04 AM

QUOTE
Think:

Roll your own FTP clients.
IRC clients
E-Mail clients.


i got to "Roll your own" and my mind was in a very different world uhh.gif

that stuff kicks ass BJ.. all the more reason for me to not have done drugs as a youth.. i need all the memory i can get to handle this!

#7 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 01 June 2004 - 06:11 AM

Would be nifty if MXM had the abililty to audect other Xbox's using MXM much like the way Avalaunch does. That and if MXM could somehow autodetect your pc based on the default gateway.

#8 BloodyMary

BloodyMary

    X-S X-perience

  • Members
  • PipPip
  • 357 posts
  • Xbox Version:unk

Posted 01 June 2004 - 07:49 AM

QUOTE (koldfuzion @ Jun 1 2004, 12:04 AM)
all the more reason for me to not have done drugs as a youth.. i need all the memory i can get to handle this!

Wish I could say the same thing... blink.gif

#9 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 01 June 2004 - 02:27 PM

Wouldn't FTP be a tad slow done with scripts? However, email, telnet, irc would rule. Apart from autodetection, another neat feature in ava is that it 'detects' a network cable plugged in AFTER booting, while other dashes need a reboot.

Another possibility is online gaming wink.gif . Sort of like yahoo games.

#10 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 01 June 2004 - 04:42 PM

I was thinking again. With this new buffer stuff, would it in theory, through some crafty scripting be possible to do cool things like MP3 to WAV or WMA conversions?



#11 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 01 June 2004 - 10:06 PM

mp3/wma compression is pretty complex (from what I guess), and I don't think it can be done without a lot of work (and I mean a lot!)

A better way would be to port a compression/uncompression library (if no one's done it already).

#12 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 01 June 2004 - 10:51 PM

Too bad I don't understand any of that stuff or I'd try to give it a go.

#13 koldfuzion

koldfuzion

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,480 posts

Posted 01 June 2004 - 11:58 PM

QUOTE
Too bad I don't understand any of that stuff or I'd try to give it a go.


heheh people think i get mad when i hear them say "MXM needs an update" because it appears that they are riding BJ for someting new.

I really get upset because Im having a hard time keeping up with the updates.

The people that say a new release is needed, really need to write something/make something... or at least let BJ take his sweet ol'e time so this stuff can soak in to my brain. Then they will see that there isnt enough gap between the releases.

#14 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 02 June 2004 - 12:26 AM

Like I always say "more is more then before"

#15 Yuyu

Yuyu

    X-S Spirit Detective

  • Moderator
  • PipPipPipPipPip
  • 1,231 posts
  • Location:Belleville, IL
  • Interests:Football (Soccer) ... Umm, Xbox?
  • Xbox Version:v1.1
  • 360 version:v2 (zephyr)

Posted 02 June 2004 - 04:44 AM

Like I always say, "Where there's a whore there's always a score."

....oh wait, this isn't my porn site... blink.gif




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users