This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Famicom clones posts (SB2000, BBG Floppy 1 etc) updating

Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#126827)
To avoid spamming this forum, I would like to keep my articles in one post, which is easy to share with you.

SB 486D posts:
The Childhood Memory – Subor Famicom Clone SB-486D (Xiao Ba Wang)
http://helloacm.com/the-childhood-memory-subor-famicom-clone-sb-486d-xiao-ba-wang/

SB2000 posts:
Using AT keyboard on modern PC using AT-PS2-USB connector
https://helloacm.com/using-at-keyboard-on-modern-pc-using-at-ps2-usb-connector/

Introduction to 8-bit Famicom Clone – Subor – SB2000
http://helloacm.com/introduction-to-8-bit-famicom-clone-subor-sb2000/

It takes 5 hours on a 8-bit famicom clone (SB2000) to compute 80 decimal places of PI
http://helloacm.com/it-takes-5-hours-on-a-8-bit-famicom-clone-sb2000-to-compute-40-decimal-places-of-pi/

How does the 8-bit BASIC perform on Famicom Clone – Subor SB2000 – FBasic – Compute PI approximation using Monte-Carlo method
http://helloacm.com/how-does-the-8-bit-basic-perform-on-famicom-clone-subor-sb2000-fbasic-compute-pi-approximation-using-monte-carlo-method/


BBG Posts:
Automatically Synchronize Date and Time on 8-bit BBG Famiclone using DB25 cable to Connect to PC
http://helloacm.com/automatically-synchronize-date-and-time-on-8-bit-bbg-famiclone-using-db25-cable-to-connect-to-pc/

PI Computation on BBG Famiclone using BASIC
http://helloacm.com/pi-computation-on-bbg-famiclone-using-basic/

Adding a pause command for 8-bit famiclone BBG – 6502 Assembly Programming
http://helloacm.com/adding-a-pause-command-for-8-bit-famiclone-bbg-6502-assembly-programming/

Dumping Memory using BASIC on 8-bit Famicom Clone – BBG
http://helloacm.com/dumping-memory-using-basic-on-8-bit-famicom-clone-bbg/

Using Peek function to read from Memory on BBG Famicom Clone on Basic Programming Language
http://helloacm.com/using-peek-function-to-read-from-memory-on-bbg-famicom-clone-on-basic-programming-language/

8-bit 6502 Assembly for Famicom Clone BBG – Tutorial 1
http://helloacm.com/8-bit-6502-assembly-for-famicom-clone-bbg-tutorial-1/

A Quick Overview of Different Versions for 8-bit BBG-DOS (Famicom Clone)
http://helloacm.com/a-quick-overview-of-different-versions-for-8-bit-bbg-dos-famicom-clone/

Set Up 8-bit Ultimate Famicom Game Console – BBG (BBK) – with Keyboard and Floppy Drive – USB Floppy Emulator – NES Game Console
http://helloacm.com/set-up-8-bit-ultimate-famicom-game-console-bbg-bbk-with-keyboard-and-floppy-drive-usb-floppy-emulator-nes-game-console/

The 8 bit DOS by Famicom Clone – BBGDOS in the 1990s
http://helloacm.com/the-8-bit-dos-by-famicom-clone-bbgdos-in-the-1990s/

Hot Boot and Cold Boot on 8-bit Famiclone BBG-DOS
http://helloacm.com/hot-boot-and-cold-boot-on-8-bit-famiclone-bbg-dos/

Output a String to Console (BBG-DOS) using 6502 Assembly for 8-bit Famicom Clone BBG – Tutorial 2
http://helloacm.com/output-a-string-to-console-bbg-dos-using-6502-assembly-for-8-bit-famicom-clone-bbg-tutorial-2/

Print 26 Uppercase Letters using 6502 Assembler on 8-bit Famicom Clone BBG (BBK) – Tutorial 5 – Using Loop
http://helloacm.com/print-26-uppercase-letters-using-6502-assembler-on-8-bit-famicom-clone-bbg-bbk-tutorial-5-using-loop/

N8 Everdrive
The Ultimate Famicom Game Cartridge – N8 Everdrive – Installed on BBG Famiclone
http://helloacm.com/the-ultimate-famicom-game-cartridge-n8-everdrive-installed-on-bbg-famiclone/
Re: Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#126831)
This is really nifty! You mention being able to make bootable floppies—have you looked at the boot sector of those floppy disks yet?
Re: Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#126832)
On BBGDOS, you can use format /s to make a bootable disk.

The bootable disk contains three files BBGDOS.sys command.cmd (or any other shell such as gamshell.cmd) and config.sys

BBGDOS.sys has to be on the sector 0 in order to be a valid bootable disk.

lidnariq wrote:
This is really nifty! You mention being able to make bootable floppies—have you looked at the boot sector of those floppy disks yet?
Re: Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#126833)
So BBGDOS.sys is a 512 byte chunk of 6502 code and 1.44MB floppy geometry information? The IBM PC would load the 512 bytes of boot sector to 0:7E00 and start executing from there (hence why it starts with a jump). I'm curious to what extent they either avoided stepping on the PC's boot path, or instead just replaced it with 6502 code instead of 8086 code.

(Did I miss this in one of your posts?)
Re: Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#126835)
It is 6502 code not 8086.
It imitates the way PC boots and BBGDOS.sys is size of 17kb.
I don't know much about the memory address yet (i have a development manual but haven't looked deeper into it)

lidnariq wrote:
So BBGDOS.sys is a 512 byte chunk of 6502 code and 1.44MB floppy geometry information? The IBM PC would load the 512 bytes of boot sector to 0:7E00 and start executing from there (hence why it starts with a jump). I'm curious to what extent they either avoided stepping on the PC's boot path, or instead just replaced it with 6502 code instead of 8086 code.

(Did I miss this in one of your posts?)
Re: Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#126838)
If you have an easy way to extract only the first 512 bytes of a bootable floppy disk, I'd be interested in taking a look.

Either way, please keep us posted as you find out more.
Re: Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#126845)
This brings back good (some bad) memories of my days playing around with the Doctor PC Jr Famiclone, around 2000-2002. Here's the archive of my page if you want to compare the PCJr with your Subor system: http://www.chrismcovell.com/drpcjr/
Re: Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#126849)
Yes, I have read your page and sent you a email before regarding the BUNG (I want to buy one but it is very rare)

ccovell wrote:
This brings back good (some bad) memories of my days playing around with the Doctor PC Jr Famiclone, around 2000-2002. Here's the archive of my page if you want to compare the PCJr with your Subor system: http://www.chrismcovell.com/drpcjr/
Re: Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#126914)
just got n8 everdrive, install it on bbg famiclone, works perfect, and love it!
Re: Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#126921)
So I decided to take a look at the disk image that ccovell has provided, and found some amusing things.

SMDOS either seems to load the boot sector to $0400 or $7C00, maybe both. On the one hand, it verifies disk geometry values from $7C1x (requiring offset 1B to 0, 1A to be 2, i.e. double sided disk). On the other hand, it JSRs to $0516 and $055E and JMPs to $05F0, and all three modulo 512 correspond to things that look suspiciously like entry points. And it verifies the first eleven bytes of the copy at $7C00 against the copy at $0589 ... which should only match if something patches it (one ends with "SMDOS1.0" while the other has "SMDOS ")

Regardless, the first three bytes on disk are actually x86 code (SJMP 0x7E0:003E, NOP), but at offset 0x3E is 6502 code. (Trying to boot a PC from an SMDOS-formatted disk would crash horribly). So, the BIOS must check the second byte of the bootsector to figure out the entry point, OR hot-patch the first byte with a 6502 relative jump instead of an x86 one, OR it just always starts execution at $7C3E.
Re: Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#127252)
New post added:
Output a String to Console (BBG-DOS) using 6502 Assembly for 8-bit Famicom Clone BBG – Tutorial 2
http://helloacm.com/output-a-string-to-console-bbg-dos-using-6502-assembly-for-8-bit-famicom-clone-bbg-tutorial-2/
Re: Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#127273)
New post added:
Print 26 Uppercase Letters using 6502 Assembler on 8-bit Famicom Clone BBG (BBK) – Tutorial 5 – Using Loop
http://helloacm.com/print-26-uppercase-letters-using-6502-assembler-on-8-bit-famicom-clone-bbg-bbk-tutorial-5-using-loop/
Re: Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#132961)
new post added 23/08/2014

SB 486D posts:
The Childhood Memory – Subor Famicom Clone SB-486D (Xiao Ba Wang)
http://helloacm.com/the-childhood-memory-subor-famicom-clone-sb-486d-xiao-ba-wang/
Re: Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#132965)
Just now became aware of this thread.

lidnariq wrote:
Regardless, the first three bytes on disk are actually x86 code (SJMP 0x7E0:003E, NOP), but at offset 0x3E is 6502 code. (Trying to boot a PC from an SMDOS-formatted disk would crash horribly). So, the BIOS must check the second byte of the bootsector to figure out the entry point, OR hot-patch the first byte with a 6502 relative jump instead of an x86 one, OR it just always starts execution at $7C3E.

What's the filesystem of the disk? Because that looks like what FAT does (it's part of the FAT header).
http://wiki.osdev.org/FAT#BPB_.28BIOS_P ... r_Block.29
Re: Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#132970)
The first three bytes aren't actually specified in content; rather, it's just that the data tables start at byte 3, and execution starts at byte 0, so the first three bytes in practice need to be a jump.

It doesn't have to be a short jump. I definitely remember finding disks that used a long relative jump ($E9) instead of short ($EB). And the NOP could be put before the JMP SHORT also.

So what I found weird is that those bytes are neither useful for the 6502, nor useful to an x86 machine.
Re: Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#132972)
Depends, some drivers rely on those bytes being there or it won't work properly (and I imagine the reason the NOP is there is to make it possible to convert the short JMP into a near JMP).

Ultimately it all boils down to reducing potential compatibility problems.
Re: Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#133122)
new post added


SB 486D posts:
The Childhood Memory – Subor Famicom Clone SB-486D (Xiao Ba Wang)
http://helloacm.com/the-childhood-memor ... o-ba-wang/
Re: Famicom clones posts (SB2000, BBG Floppy 1 etc) updating
by on (#136118)
new post added

Using AT keyboard on modern PC using AT-PS2-USB connector
https://helloacm.com/using-at-keyboard-on-modern-pc-using-at-ps2-usb-connector/