It is currently Wed Jul 26, 2017 3:28 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Sat Apr 11, 2009 10:55 am 
Offline
User avatar

Joined: Sun Feb 15, 2009 8:23 am
Posts: 27
FC(任天堂NES)自编程序.创意作品,首次将FC当成是小程序使用.
全英文版.全文字程序.输入年份计算生肖

Do you want know what Mascots in the Lunar Year of China?
Tell me a year which you want known. And I'll tell you.

Here,I use FC.

Download here

now , new download : http://fogota.ys168.com/


Last edited by fogota on Fri Mar 10, 2017 9:50 pm, edited 3 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 11, 2009 1:23 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3444
Location: Indianapolis
That's good, for a first program it does a lot. There are some problems with the PPU. I tested it with NEStopia and FCEU.

If you want, I'll review the code and help you fix all the problems.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 11, 2009 8:52 pm 
Offline
User avatar

Joined: Sun Feb 15, 2009 8:23 am
Posts: 27
With your help, too much honor to it.

I'm using the NBasic Compiler.

Here the asm & NBasic code.

http://www.uushare.com/user/fogota/files/1487930

my friends at NET ,they are going to add some pritrues to it.


Last edited by fogota on Mon Apr 13, 2009 6:16 am, edited 3 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 11, 2009 9:03 pm 
Offline
User avatar

Joined: Sun Feb 15, 2009 8:23 am
Posts: 27
It's not my first program.It's the second.

THe first program is GREEDY SNAKE.

HA..HA.. at the same net-disk.

Download here
http://www.uushare.com/group/10085/topic/11555

http://www.uushare.com/user/fogota/files/1131553


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 24, 2009 11:06 am 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3444
Location: Indianapolis
Sorry about the slow reply.

Greedy Snake is pretty cool, I only tested it on emulators so far, but it seems to work there. One misspelling is that it says "GAME LEVE" instead of "GAME LEVEL".

I've never used nbasic so it confuses me a bit, so I'm not sure of what to change to fix the graphics in the Lunar Year program. One problem I did see was waiting for vblank end (with LDA $2002 / BMI). That won't work, because the vblank flag is cleared as soon as it's read.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 24, 2009 11:30 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18673
Location: NE Indiana, USA (NTSC)
Most of the time, you don't need to wait for the end of vblank. You can just set up the scroll registers, run your outside-of-vblank code, and wait for the NMI handler to run again.

Historical note: Some early homebrew developers assumed that the NES's vblank flag behaved like Nesticle's. In Nesticle, if you don't use NMI, you have to wait for vblank to end then wait for it to start again; otherwise, your main loop might run twice if it finishes while still in vblank.

Platform note: The Game Boy Advance's vblank flag operates like Nesticle's, but the vblank interrupt is still preferred there because the GBA CPU has a "wait for next interrupt" instruction that lowers CPU power consumption to near zero.

Exception: It is possible to wait for the end of vblank, and you may have to do that if you're using forced blanking at the top of the screen. The right way involves triggering a sprite 0 hit and waiting for that flag to become 0.

"GAME LEVE" might be the 8 sprites limitation.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 26, 2009 8:43 am 
Offline
User avatar

Joined: Sun Feb 15, 2009 8:23 am
Posts: 27
Memblers wrote:
Sorry about the slow reply.

Greedy Snake is pretty cool, I only tested it on emulators so far, but it seems to work there. One misspelling is that it says "GAME LEVE" instead of "GAME LEVEL".

I've never used nbasic so it confuses me a bit, so I'm not sure of what to change to fix the graphics in the Lunar Year program. One problem I did see was waiting for vblank end (with LDA $2002 / BMI). That won't work, because the vblank flag is cleared as soon as it's read.


I'm sorry for my English.I'll change it "GAME LEVEL".

And what do you use?

My nbasic come from Mr.Bob Rost(http://bobrost.com/nes/)

I'm learning his code. I just try to used the "wait for vbland end".

And it looks like good. So I just use it. I'm just learning...

My games all can run in my MP4 what it has a emulator .

Image


Last edited by fogota on Sun Apr 26, 2009 9:16 am, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 26, 2009 8:54 am 
Offline
User avatar

Joined: Sun Feb 15, 2009 8:23 am
Posts: 27
tepples wrote:
Most of the time, you don't need to wait for the end of vblank. You can just set up the scroll registers, run your outside-of-vblank code, and wait for the NMI handler to run again.

Historical note: Some early homebrew developers assumed that the NES's vblank flag behaved like Nesticle's. In Nesticle, if you don't use NMI, you have to wait for vblank to end then wait for it to start again; otherwise, your main loop might run twice if it finishes while still in vblank.

Platform note: The Game Boy Advance's vblank flag operates like Nesticle's, but the vblank interrupt is still preferred there because the GBA CPU has a "wait for next interrupt" instruction that lowers CPU power consumption to near zero.

Exception: It is possible to wait for the end of vblank, and you may have to do that if you're using forced blanking at the top of the screen. The right way involves triggering a sprite 0 hit and waiting for that flag to become 0.

"GAME LEVE" might be the 8 sprites limitation.


Thanks a lot!!

I'll learning....

My friend on China,Win for my GREEDY SNAKE.
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 26, 2009 9:20 am 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3444
Location: Indianapolis
I use cc65 http://www.cc65.org/, but I've also worked with many other assembler programs. cc65 has a C compiler, but I never use that part. I have seen a few good programs use the nbasic compiler.

Really the best way to update VRAM, is to use the NMI interrupt. But since that's in assembly I don't know how (or if) nbasic handles it.

tepples had mentioned NESticle, it sounds like the emulator in the MP4 device may be similar. Best described as permissive, you can get away with a lot of things the hardware won't allow. I wrote many programs that worked on NESticle but not other emulators or the real system when I first started out (since NESticle was the only emulator to test it on).

I would advise using an emulator like Nestopia http://nestopia.sourceforge.net/ for testing. Often I'll add it into the .bat file just for convenience. And for the program, try to keep all updates to VRAM as short as possible and only do it immediately after vblank is detected. It should work then. By VRAM accesses I mean anything to the $2006 and $2007 registers (which is 8198 and 8199 in nbasic).

As the program gets more complex, it helps to write VRAM updates into a buffer in RAM first, then copy it all during vblank.

You've done good at learning this stuff, and your english is pretty good, by the way. It's pretty cool to create a program from nothing. :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 28, 2009 6:23 am 
Offline
User avatar

Joined: Sun Feb 15, 2009 8:23 am
Posts: 27
Memblers wrote:
I use cc65 http://www.cc65.org/, but I've also worked with many other assembler programs. cc65 has a C compiler, but I never use that part. I have seen a few good programs use the nbasic compiler.

Really the best way to update VRAM, is to use the NMI interrupt. But since that's in assembly I don't know how (or if) nbasic handles it.

tepples had mentioned NESticle, it sounds like the emulator in the MP4 device may be similar. Best described as permissive, you can get away with a lot of things the hardware won't allow. I wrote many programs that worked on NESticle but not other emulators or the real system when I first started out (since NESticle was the only emulator to test it on).

I would advise using an emulator like Nestopia http://nestopia.sourceforge.net/ for testing. Often I'll add it into the .bat file just for convenience. And for the program, try to keep all updates to VRAM as short as possible and only do it immediately after vblank is detected. It should work then. By VRAM accesses I mean anything to the $2006 and $2007 registers (which is 8198 and 8199 in nbasic).

As the program gets more complex, it helps to write VRAM updates into a buffer in RAM first, then copy it all during vblank.

You've done good at learning this stuff, and your english is pretty good, by the way. It's pretty cool to create a program from nothing. :)


Oh, yes, you're right. My idae is same with you.

But I'm lazy,,,,so have no time to reseach the interrupt.

I know that the VRAM accesses must be end , at the end of vblank.

So I use a lot of codes to wait the end of vblank.

The tools is too lack to development. I just have Nbasic and a few of emulator.

My codes often give me some wrong message what I do not understand.

I busy modifing my codes.


Top
 Profile  
 
PostPosted: Sat Nov 01, 2014 4:47 pm 
Offline
User avatar

Joined: Sun Jan 19, 2014 6:15 pm
Posts: 15
计算生肖喝了,uushare早挂了……

这2009年的贴,真的好老!
然后到现在不见几个新的,可见nesdev的中文专区是有多么冷清啊!


Top
 Profile  
 
PostPosted: Fri Mar 10, 2017 9:46 pm 
Offline
User avatar

Joined: Sun Feb 15, 2009 8:23 am
Posts: 27
Yave wrote:
计算生肖喝了,uushare早挂了……

这2009年的贴,真的好老!
然后到现在不见几个新的,可见nesdev的中文专区是有多么冷清啊!


新的下载 http://fogota.ys168.com/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group