nesdev.com
http://forums.nesdev.com/

用FC计算生肖(THE LUNAR YEAR MASCOTS OF CHINA)
http://forums.nesdev.com/viewtopic.php?f=18&t=5045
Page 1 of 1

Author:  fogota [ Sat Apr 11, 2009 10:55 am ]
Post subject:  用FC计算生肖(THE LUNAR YEAR MASCOTS OF CHINA)

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/

Author:  Memblers [ Sat Apr 11, 2009 1:23 pm ]
Post subject: 

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.

Author:  fogota [ Sat Apr 11, 2009 8:52 pm ]
Post subject: 

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.

Author:  fogota [ Sat Apr 11, 2009 9:03 pm ]
Post subject: 

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

Author:  Memblers [ Fri Apr 24, 2009 11:06 am ]
Post subject: 

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.

Author:  tepples [ Fri Apr 24, 2009 11:30 am ]
Post subject: 

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.

Author:  fogota [ Sun Apr 26, 2009 8:43 am ]
Post subject: 

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

Author:  fogota [ Sun Apr 26, 2009 8:54 am ]
Post subject: 

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

Author:  Memblers [ Sun Apr 26, 2009 9:20 am ]
Post subject: 

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. :)

Author:  fogota [ Tue Apr 28, 2009 6:23 am ]
Post subject: 

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.

Author:  Yave [ Sat Nov 01, 2014 4:47 pm ]
Post subject:  Re: 用FC计算生肖(THE LUNAR YEAR MASCOTS OF CHINA)

计算生肖喝了,uushare早挂了……

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

Author:  fogota [ Fri Mar 10, 2017 9:46 pm ]
Post subject:  Re: 用FC计算生肖(THE LUNAR YEAR MASCOTS OF CHINA)

Yave wrote:
计算生肖喝了,uushare早挂了……

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


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

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/