All my questions are here.. ;o)

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post 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.
lord

a question

Post 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 ..
lord

see it

Post 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???
User avatar
lord_Chile
Posts: 120
Joined: Thu Feb 02, 2006 7:07 am
Location: Chile (South America), Quilpué
Contact:

another question about "the latch"

Post 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
Good day to nesdev people. Lord..
Author of nothing =P
UTFSM Sansano programmer.. lord_Chile
Saludos a la Sede JMC de la UTFSM... Viña del Mar, CHILE
User avatar
lynxsolaris
Posts: 143
Joined: Tue Jan 17, 2006 10:39 am
Location: North Carolina

Re: another question about "the latch"

Post 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:
User avatar
Memblers
Site Admin
Posts: 3901
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Post 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.
User avatar
lynxsolaris
Posts: 143
Joined: Tue Jan 17, 2006 10:39 am
Location: North Carolina

Re: a question

Post 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.
_tokumaru_

Post 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.
User avatar
lord_Chile
Posts: 120
Joined: Thu Feb 02, 2006 7:07 am
Location: Chile (South America), Quilpué
Contact:

yes!, i am getting work it

Post 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 :)
Good day to nesdev people. Lord..
Author of nothing =P
UTFSM Sansano programmer.. lord_Chile
Saludos a la Sede JMC de la UTFSM... Viña del Mar, CHILE
User avatar
lord_Chile
Posts: 120
Joined: Thu Feb 02, 2006 7:07 am
Location: Chile (South America), Quilpué
Contact:

yessssssssssss!

Post 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!
Good day to nesdev people. Lord..
Author of nothing =P
UTFSM Sansano programmer.. lord_Chile
Saludos a la Sede JMC de la UTFSM... Viña del Mar, CHILE
User avatar
lord_Chile
Posts: 120
Joined: Thu Feb 02, 2006 7:07 am
Location: Chile (South America), Quilpué
Contact:

see it!, a output of my php script

Post 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!.
Good day to nesdev people. Lord..
Author of nothing =P
UTFSM Sansano programmer.. lord_Chile
Saludos a la Sede JMC de la UTFSM... Viña del Mar, CHILE
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

Use the ... syntax for really long urls, or use tinyurl.com.
lord

My crazy idea

Post 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???
lord

help

Post by lord »

8)
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post 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.
Useless, lumbering half-wits don't scare us.
Post Reply