new technologies for developing on NES

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

iamooos
Posts: 16
Joined: Tue Oct 18, 2022 2:37 pm

new technologies for developing on NES

Post by iamooos »

so i have been talking to chatgpt.


i showed it a function in C that loads metatiles, top to bottom: (this is essentially shiru's metatile code)

Code: Select all

        if(pad&PAD_UP)  //this code loads metatiles to fill the entire the screen, top to bottom, from an array of metatiles.
	{

		if(!(level_y&7))//put new row every 8 pixels
		{

			prepare_row_update(name_row,level_y/16); //where on the screen first, then what part of the level to load.
			set_vram_update(update_list);//the update is handled at next NMI
			
		    if(name_row<30) //30 rows worth of 8 pixels.
			{
			++name_row;//next row.
			}
		}

		scroll(0,scroll_y);//scroll value will be applied on the next nmi as well
		++level_y;

	}


then i told the bot:
now make a new function so that: when i press down the metatiles fill the screen bottom to top


not only did it write the function instantly, it explained exactly what it was doing.

Code: Select all

void fill_screen_bottom_to_top() {
    if(pad&PAD_DOWN) {
        if(!(level_y&7)) {
            prepare_row_update(name_row, (level_y/16) + 30);
            set_vram_update(update_list);
            if(name_row > 0) {
                --name_row;
            }
        }
        --level_y;
    }
}

i plugged it into my NES rom and it actually works..

how do you guys feel about it? are you using this tech right now? is it a gamechanger? will this make your game come faster?
i'd love to hear more thoughts.

i am not sure if the bot can really handle your assembly language i havent tried, that might be where it can no longer be helpful.

but honestly for prototyping something it's a super useful thing to have!

it doesn't always help or work out the best though, but sometimes it does, and it comprehends things very well!
User avatar
tokumaru
Posts: 12312
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: new technologies for developing on NES

Post by tokumaru »

I had some fun with ChatGPT, but the code it wrote for me often had silly errors in it, like reading past the end of arrays and things like that. It would promptly fix the mistakes once I pointed them out (I'd just say "you're reading past the end of the array" and it'd realize where the mistake was), but the fixes themselves weren't always correct either, so it'd take a few iterations before things would work as expected.

I'm definitely not ready to take ChatGPT's output to put directly in my programs, specially in 6502 assembly, which it can write to some extent, but is completely oblivious when it comes to addressing modes and how registers can be used.
iamooos
Posts: 16
Joined: Tue Oct 18, 2022 2:37 pm

Re: new technologies for developing on NES

Post by iamooos »

i agree, maybe though it would be beneficial to keep correcting it's errors. maybe that will slowly train it so that eventually it can produce good results
Oziphantom
Posts: 1405
Joined: Tue Feb 07, 2017 2:03 am

Re: new technologies for developing on NES

Post by Oziphantom »

ChatGPT is a "copy my homework but change it to make it your own" tool. Basically it is essentially "shiru's metatile code" because that is what it copy pasted and then pushed around a bit to make "unique". Basically its a 5 year old that copies SO answers without any concept of what it is doing.
User avatar
tokumaru
Posts: 12312
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: new technologies for developing on NES

Post by tokumaru »

iamooos wrote: Fri Jan 20, 2023 10:05 pm i agree, maybe though it would be beneficial to keep correcting it's errors. maybe that will slowly train it so that eventually it can produce good results
It doesn't look like ChatGPT can be trained by users though, it's frozen in time with the knowledge it currently has. Which's probably a good idea, considering that random internet trolls could easily screw it up by intentionally feeding it a bunch of crap. I guess people working on the project could still review logged conversations manually and decide to make use of user input to improve the tool, so it's still possible that our corrections will help in the end.
Oziphantom
Posts: 1405
Joined: Tue Feb 07, 2017 2:03 am

Re: new technologies for developing on NES

Post by Oziphantom »

yeah its closed otherwise you will have it spewing CD keys and getting DMCA'd to death. They have teams in Africa who have to scan and tag things to make sure it avoids the destruction of its predecessor https://twitter.com/billyperrigo/status ... J7DAvwp1kg

But even then it has two uses cases.

People who don't know what they are doing and think it helps them get ahead, but then will get things done without learning anything and rapidly hit a wall/get killed by all the bugs they don't understand how to fix.
And
People who know what they are doing, and hence I can make such trivial code faster than trying to talk to it and fix its output.

So basically it has no real use in programming, as it can't actually help anybody learn and anybody who can fix its output can do things faster without it, making it a negative addition. Its main job is to be a better "Hi welcome to our website my name is Mark, how can I assist you today?" bot.
User avatar
tokumaru
Posts: 12312
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: new technologies for developing on NES

Post by tokumaru »

When it comes to programming, I've used ChatGPT to do something similar to "rubber duck debugging", where we basically talk about some programming problem, the possible solutions, relevant algorithms, and so on. It never came up with anything groundbreaking that would solve everything, but just talking with someone/something that can keep up a conversation about such obscure topics will often help me come up with good ideas.
Oziphantom
Posts: 1405
Joined: Tue Feb 07, 2017 2:03 am

Re: new technologies for developing on NES

Post by Oziphantom »

so its a better inanimate rubber duck :D
iamooos
Posts: 16
Joined: Tue Oct 18, 2022 2:37 pm

Re: new technologies for developing on NES

Post by iamooos »

Oziphantom wrote: Fri Jan 20, 2023 10:34 pm yeah its closed otherwise you will have it spewing CD keys and getting DMCA'd to death. They have teams in Africa who have to scan and tag things to make sure it avoids the destruction of its predecessor https://twitter.com/billyperrigo/status ... J7DAvwp1kg

But even then it has two uses cases.

People who don't know what they are doing and think it helps them get ahead, but then will get things done without learning anything and rapidly hit a wall/get killed by all the bugs they don't understand how to fix.
And
People who know what they are doing, and hence I can make such trivial code faster than trying to talk to it and fix its output.

So basically it has no real use in programming, as it can't actually help anybody learn and anybody who can fix its output can do things faster without it, making it a negative addition. Its main job is to be a better "Hi welcome to our website my name is Mark, how can I assist you today?" bot.

i think this is incredibly short sighted.


the bot helped me design a rendering engine architecture that would run in monogame.
it only wrote useless pseudo code, but that's not the point of it, since it has all of the siggraph papers, i could make proposals to the ai for methods to render scenes, and also to precompute and store data for rendering scenes.
the bot didn't come up with any ideas, all of the ideas were mine, but it helped me outline a whole system of global illumination that can render a morning to night time scene all precomputed and stored in texture atlases.

the idea to use texture atlases to reconstruct light volumes only occurred to me while we were planning the whole thing, but as soon as i asked if it was possible it gave me ideas of how it could be done

in fact, the system it ended up proposing, supposedly can handle refractions too. which is something i didn't even think of or consider.
but since it knows all of the formulas for physics, it's as simple as plugging them in sometimes, so it does. (it didn't give me literally the shader/function for it in this instance, but all i have to do is ask)



i've written a deferred rendering engine before with a ton of bells and whistles, but this global illumination system would be so complex that there's no way i could have planned it all by myself especially not with the proposed "hacks" to save on memory and processing. and never this quickly.
the rendering engine planning took a long time, and with the bot i can do comparable work in 1 day
tepples
Posts: 22471
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: new technologies for developing on NES

Post by tepples »

I probably won't try ChatGPT or DALL-E 2 any time soon because of its requirement for a unique mobile phone number rather than one shared with another member of the household. I'd give it a try if I knew it were compelling enough to be worth the cost of setting up another line of service.

EDIT: remove complaining
User avatar
Individualised
Posts: 149
Joined: Mon Sep 05, 2022 6:46 am

Re: new technologies for developing on NES

Post by Individualised »

tepples wrote: Sat Jan 21, 2023 9:13 am Like DALL-E 2, ChatGPT is yet another service that I don't see myself evaluating any time soon until people can show me why it's worth the money.

OpenAI allows one account per mobile phone number and does not support landlines or VoIP. I once tried to sign up for OpenAI and failed because I am not comfortable giving OpenAI a mobile phone number to which to send an SMS verification code. I have read that several other users have failed to sign up for OpenAI because they lack a mobile phone entirely.

I've been told that mobile phone service where I live is available for $240 per year plus the price of the handset. What makes ChatGPT and other tools offered by OpenAI worth this amount?
Nothing does, but OpenAI likely never considered this and assumed that everyone has a mobile phone these days as an essential. Not that I agree with that thinking, but since they're a company all about a cutting edge technology it kinda makes sense.
User avatar
tokumaru
Posts: 12312
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: new technologies for developing on NES

Post by tokumaru »

It's getting harder and harder to live without a smartphone and a data plan these days. Of course you can choose to live a basic life and avoid much of today's technology, but if you rely on technology in general for work or other things in your daily life (e g. banking) you might as well cave in and avoid all the trouble that comes with fighting the system. Not being able to use ChatGPT will probably not be the biggest of your problems if you continue refusing to get your own phone number in today's world.
Garth
Posts: 240
Joined: Wed Nov 30, 2016 4:45 pm
Location: Southern California
Contact:

Re: new technologies for developing on NES

Post by Garth »

There are several reasons that I do not, and will not, use a smartphone.
http://WilsonMinesCo.com/ lots of 6502 resources
Drag
Posts: 1491
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: new technologies for developing on NES

Post by Drag »

I don't like the sensationalization surrounding ChatGPT, because it's basically Stack Overflow without the peer review, yet everyone talks about it like there's some kind of grand revolution happening.

That and ironically, being a programmer and knowing how AIs work makes me trust them even less. :D

Therefore, I'm disinterested in using them for anything other than just screwing around for fun.
User avatar
tokumaru
Posts: 12312
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: new technologies for developing on NES

Post by tokumaru »

Garth wrote: Sat Jan 21, 2023 7:12 pmThere are several reasons that I do not, and will not, use a smartphone.
You're well within your right to make this decision, and I have absolutely no intention of changing your or anyone else's mind, I'm just saying that technology is heavily focused on smartphones these days, so you're likely to miss on more and more things if you don't own one, specially if you work with or are into technology.
Post Reply