Page 3 of 10

Posted: Tue Feb 07, 2006 5:02 pm
by tepples
Cool idea for emulators: have them dump palette RAM and OAM each frame (272 bytes per frame total, using the "unused" bytes of palette memory for $2000 and the like) and then put a feature into a tile editor allowing display of the sprites at any given moment with the current CHR.

a question

Posted: Thu Feb 09, 2006 4:45 am
by lord
im trying making a PHP script in order to decode pattern tables. and show characters in a 8x8 table of colors in html. yes i can decode .chrs manually then i fully understand that..

My question is: what instruction in php help to me to read a "binary file"??. and how can i reading a "16 byte" (8x8) pixels???.. i wanna to know only how read... because i know the another stuff :D ..

see it

Posted: Thu Feb 09, 2006 5:27 am
by lord
string fread ( resource gestor, int longitud )

yeah.. but string is like aSusdil@xaqa??

i wanna getting strings like C6DE0123FF221300.... or just getting 11111001 11001100.. Is it possible in php reading binary files???

another question about "the latch"

Posted: Thu Feb 09, 2006 10:08 am
by lord_Chile
And another question.. i haver read here about something called "the latch", what is it?.. how important it is?? when set it?? 0, or to 1???

ps: There are girls on nesdev?? do you know anyone???
:D :wink: hahaahaha..

god luck

Re: another question about "the latch"

Posted: Thu Feb 09, 2006 9:43 pm
by lynxsolaris
lord_Chile wrote:And another question.. i haver read here about something called "the latch", what is it?.. how important it is?? when set it?? 0, or to 1???

ps: There are girls on nesdev?? do you know anyone???
:D :wink: hahaahaha..

god luck
Check this out:

http://nesdev.com/bbs/viewtopic.php?t=1 ... h&start=15

I had the same question.

EDIT: About latch .. not girls on nesdev. :lol:

Posted: Thu Feb 09, 2006 11:09 pm
by Memblers
For file access with PHP, how about an SQL database? I haven't used PHP except for extremely simple ('hello world' type) stuff, so I don't know of any other way.

Re: a question

Posted: Fri Feb 10, 2006 5:20 am
by lynxsolaris
lord wrote:im trying making a PHP script in order to decode pattern tables. and show characters in a 8x8 table of colors in html. yes i can decode .chrs manually then i fully understand that..

My question is: what instruction in php help to me to read a "binary file"??. and how can i reading a "16 byte" (8x8) pixels???.. i wanna to know only how read... because i know the another stuff :D ..

use fread:

http://us2.php.net/manual/en/function.fread.php

EDIT: nevermind ... see you already have that.

Posted: Fri Feb 10, 2006 7:07 am
by _tokumaru_
You seem to be reading the data just fine... just don't expect it to come arranged as hexadecimal numbers or even as bits...

Just convert each character from the string into values... each character is a byte. I don't know how to do it in php though, I only know asp, but surelly there must be a function for that.

yes!, i am getting work it

Posted: Fri Feb 10, 2006 9:19 am
by lord_Chile
only any little stuff remain me.. i dont know good working with matrix in php!!!.. then my program lost the "1"s and "0s" in matrix..

but 1st bpp (first 8 bytes are showed good),.. im still working...

i can get 0s and 1s representation of file!..

working...
thanks :)

yessssssssssss!

Posted: Fri Feb 10, 2006 9:51 am
by lord_Chile
just now i read web design using php4!!.. and i read parameters by reference.. i was very stupid because, i was replacing my matrix each time then matrix didnt load completely.. but know.. i have 0.1 stable version of code hehehe.. full art.. it's currently only a test, but it seem good!

see it!, a output of my php script

Posted: Fri Feb 10, 2006 10:08 am
by lord_Chile
In my university named "Universidad tecnica federico santa maria" from Chile exist a page for students of this university.. I think that people loving programming can subscribe here clicking on "crear cuenta" (create account).. but this page is in spagnol..

i post the output of my program here, currently it draw sprite number 1 (i give spritenumber 1 like parameter) and it was read of smb.chr!!. link called "next" is BAD because now i dont have a server then i send only output to this page... opinions.. i am starting to making more funtionality to it, because it can show any chr without compression.. put your attention on 1s and 0s, because it's real, and was ripped directly from bytes by bytes..

IT'S THE URL!!!
http://www.inf.jmc.utfsm.cl/contenidos ... 0210135535
good luck :D
ps: memblers sorry, width of this post is very large...
but url of my university is so large!.

Posted: Fri Feb 10, 2006 1:14 pm
by tepples
Use the ... syntax for really long urls, or use tinyurl.com.

My crazy idea

Posted: Tue Feb 14, 2006 5:10 am
by lord
yeah, im making a decoder of nametables and patterntables.. i use rocknes's emu and i export nametable of super mario bros 1. i get .chr and reading .nam file in binary mode i draw to great scale background of smb1 using a php script with a output in html tables!!!.. my another decoder in php is for really good sprites to scale, too.. i have smb, toadstool, koopa hehe.. it's really slow.. it takes 20 minutes on draw.. how can i improve my code???..

but i have any questions... .nam file is 4 kb.... for what??.. when i read documents they give to me understand that nes has space for only two nametables, this space is 2kb.. for what???.. then each nametable is 1kb??? or is space of 2kb for each nametable???.. then when rocknes exports nametables it's exporting 2 nametables????? (4 kb??)..

another question: i read nametable for 32 bytes * 30 bytes.. yeah.. and where are attribute tables???.. i know that it's inside .nam.. but where?? how many bytes???

help

Posted: Tue Feb 14, 2006 7:10 am
by lord
8)

Posted: Tue Feb 14, 2006 10:04 am
by Bregalad
Pattern tables, attribute tables and nametables are very well documented, after all. I already knew all how they worked before startring coding my very first NES programm attempt. I really think you're asking very stupid questions.