Discussion: NGF Dev. Inc©
Afficher un message
Vieux 16/02/2010, 15h49   #169
CeL
 
Avatar de CeL
 
Date d'inscription: avril 2007
Localisation: Guyancourt
Messages: 946
je ne vois pas d'autre solution que de zapper l'intro, ou carrément de la recoder dans le main().

quand je compile le P1 je perds le le logo neogeo
quand je rajoute la zic, je perds la zic d'intro
quand je rajoute les sprites, je perds le max 330
Ca aurait été tellement plus facile si le boot était sur la console

Ou alors si qqun est capable de greffer le logo "NEO-GEO" à une adresse définie d'un p1 que je fournirais...

Sinon pour désactiver le bootscreen:
fteck, saurais-tu modifier le code suivant pour conditionner le lancement de l'intro ?

Code:
	* ++====================================================================++
	* || common_crt0_cart.s - C Run Time Startup Code for Neo Geo Cartridge	||
	* ++--------------------------------------------------------------------++
	* || $Id: common_crt0_cart.s,v 1.5 2001/07/13 14:46:31 fma Exp $		||
	* ++--------------------------------------------------------------------++
	* || This is the startup code needed by programs compiled with GCC		||
	* ++--------------------------------------------------------------------||
	* || BGM: Guitar Vader - S.P.Y.											||
	* ++====================================================================++

********************** Exported Symbols **********************
	.globl	_start
	.globl	atexit

********************** Imported Symbols **********************
	.globl	__do_global_ctors
	.globl	__do_global_dtors
	.globl	main
	.globl	memset
	.globl	__bss_start	
	.globl	_end

********************** Program Start *************************

** NOTE: Cartridge systems have swapped IRQ1 and IRQ2

	.long	0x10F300, 0xC00402, 0xC00408, 0xC0040E
	.long	0xC00414, 0xC00426, 0xC00426, 0xC00426
	.long	0xC0041A, 0xC00420, 0xC00426, 0xC00426
	.long	0xC00426, 0xC00426, 0xC00426, 0xC0042C
	.long	0xC00522, 0xC00528, 0xC0052E, 0xC00534
	.long	0xC0053A, 0xC004F2, 0xC004EC, 0xC004E6
	.long	0xC004E0, IRQ2,     IRQ1,     IRQ3
	.long	DUMMY,	  DUMMY,    DUMMY,    DUMMY
	.long	TRAP00,	  TRAP01,	TRAP02,	  TRAP03
	.long	TRAP04,	  TRAP05,   TRAP06,   TRAP07
	.long   TRAP08,   TRAP09,   TRAP10,   TRAP11
	.long	TRAP12,   TRAP13,   TRAP14,   TRAP15
	.long	0xC00426, 0xC00426, 0xC00426, 0xC00426
	.long	0xC00426, 0xC00426, 0xC00426, 0xC00426
	.long	0xC00426, 0xC00426, 0xC00426, 0xC00426
	.long	0xC00426, 0xC00426, 0xC00426, 0xC00426
	
	.ascii	"NEO-GEO"
	.byte	CDDA_FLAG
	.word	GUID
	.long	0x0
	.long	DEBUG_DIPS
	.word	0x0
	.word	LOGO_START
	.long	_jp_config
	.long	_us_config
	.long	_sp_config

	jmp		ENTRY_POINT1
	jmp		ENTRY_POINT2
	jmp		ENTRY_POINT3
	jmp		ENTRY_POINT4
	
	.org	0x182

	.long	_security

_security:
	moveq	#0,d3
	tst.w	0xa14(a5)
	bne		l2a53a
	movea.l	0xa04(a5),a0
	move.w	0xa08(a5),d7

l2a508:
	move.b	d0,0x300001
	move.w	(a0),d1
	cmpi.b	#0xff,d1
	beq.s	l2a530
	move.w	2(a0),d0
	cmp.b	0xace(a5),d0
	bne.s	l2a530
	move.w	4(a0),d0
	cmp.b	0xacf(a5),d0
	bne.s	l2a530
	cmp.b	0xad0(a5),d1
	beq.s	l2a538

l2a530:
	addq.l	#8,a0
	dbf		d7,l2a508
	move.w	d7,d3
l2a538:
	rts

l2a53a:
	movea.l	0xa04(a5),a0
	move.w	0xa08(a5),d7
l2a542:
	move.w	(a0),d1
	lsr.w	#8,d1
	cmpi.b	#0xff,d1
	beq.s	l2a566
	move.w	(a0),d0
	cmp.b	0xace(a5),d0
	bne.s	l2a566
	move.w	2(a0),d0
	lsr.w	#8,d0
	cmp.b	0xacf(a5),d0
	bne.s	l2a566
	cmp.b	0xad0(a5),d1
	beq.s	l2a56e
l2a566:
	addq.l	#4,a0
	dbf		d7,l2a542
	move.w	d7,d3
l2a56e:
	rts

	.align	4

* Dummy exception routine
_dummy_exc_handler:
	rte

	.align	4

* Dummy sub-routine
_dummy_config_handler:
	rts

	.align	4

* Standard IRQ1 handler
_irq1_handler:
   addq.w #1, 0x401ffe
	move.w	#2, 0x3C000C
	rte

	.align	4

* Standard IRQ2 handler
_irq2_handler:
	*addq.w #1, 0x401ffe
	move.w	#1, _vbl_flag
	tst.b	0x10FD80
	bmi.s	0f
	jmp		0xC00438
0:
	movem.l	d0-d7/a0-a6,-(sp)
	move.b	d0, 0x300001
	jsr		0xC0044A
	movem.l	(sp)+, d0-d7/a0-a6
	move.w	#4, 0x3C000C
	rte

	.align	4

* Standard IRQ3 handler
_irq3_handler:
	move.w	#1, 0x3C000C
	rte

	.align	4

* Dummy atexit (does nothing for now)
atexit:
	moveq	#0, d0
	rts

	.align	4

* Entry point of our program
_start:
	* Setup stack pointer and 'system' pointer
	lea		0x10F300,a7
	lea		0x108000,a5

	* Reset watchdog
	move.b	d0,0x300001
	
	* Flush interrupts
	move.b	#7,0x3C000C
	
	* Enable manual reset (A+B+C+START or SELECT)
	bclr	#7,0x10FD80
	
	* Enable interrupts
	move.w	#0x2000,sr

	* Initialize BSS section
	move.l	#_end, d0
	sub.l	#__bss_start, d0
	move.l	d0, -(a7)
	clr.l	-(a7)
	pea		__bss_start
	jbsr	memset	

	* Jump to main
	jbsr	main

	* Call global destructors
	jbsr	__do_global_dtors

	* For cart systems, infinite loop
9:
	jmp	9b(pc)

	.align	4


J'ai trouvé un code qui marche bien, que j'arrive a compiler avec snasm68k. Le DISPLAY_LOGO equ 0 fonctionne bien ici:

Code:
*******************************************************************************
* FUNCTION:	
* DESCRIPTION:	
* PARAMETERS:	
*******************************************************************************
STACKPTR	equ	$10F300
DISPLAY_LOGO	equ	0

*******************************************************************************
* Header
*******************************************************************************
	; Stack Ptr = $10F300
	; InitialPC = $C00402
	dc.l	$10F300,	$C00402,	$C00408,	$C0040E	

	; Ptr to debugging switch = $00C00414
	dc.l	$C00414,	$C00426,	$C00426,	$C00426
	dc.l	$C0041A,	$C00420,	$C00426,	$C00426
	dc.l	$C00426,	$C00426,	$C00426,	$C0042C
	dc.l	$C00522,	$C00528,	$C0052E,	$C00534
	dc.l	$C0053A,	$C004F2,	$C004EC,	$C004E6

	; Interrupt pointers
	dc.l	$C004E0,	Irq1,		Irq2,		Irq3
	dc.l	Dummy,		Dummy,		Dummy,		Dummy
	; Traps
	dc.l	Dummy,		Dummy,		Dummy,		Dummy
	dc.l	Dummy,		Dummy,		Dummy,		Dummy
	dc.l	Dummy,		Dummy,		Dummy,		Dummy
	dc.l	Dummy,		Dummy,		Dummy,		Dummy
	
	dc.l	$C00426,	$C00426,	$C00426,	$C00426
	dc.l	$C00426,	$C00426,	$C00426,	$C00426
	dc.l	$C00426,	$C00426,	$C00426,	$C00426
	dc.l	$C00426,	$C00426,	$C00426,	$C00426

	; Magic bytes
	dc.b	'NEO-GEO'
	
	; CDDA Flag
	dc.b	$00

	; $0273 = NGH number
	dc.w	$0273
	
	; Unknown
	dc.l	$00000000
	
	; Pointer to debugging switch
	dc.l	$10E000
	
	if DISPLAY_LOGO=1
		; Starting sprite number = $0000
		dc.w	$1000
		; Logo start
		dc.w	$005c
		move.b	#$0,$320000	; init le moteur de son
		move.b	#$4,$320000	; joue le son spoutnick	

	else
		dc.w	$0
		dc.w	$138
	endc

	; Pointer to Japanese config
	dc.l	JapaneseConfig
	
	; Pointer to English config
	dc.l	EnglishConfig
	
	; Pointer to Spanish config
	dc.l	SpanishConfig

	; Entry point of program
	jmp	_start
	jmp	Start2
	jmp	Start3
	jmp	Start4

	dc.l	$FFFFFFFF,$FFFFFFFF,$FFFFFFFF,$FFFFFFFF
	dc.l	$FFFFFFFF,$FFFFFFFF,$FFFFFFFF,$FFFFFFFF
	dc.l	$FFFFFFFF,$FFFFFFFF,$FFFFFFFF,$FFFFFFFF
	dc.l	$FFFFFFFF,$FFFFFFFF,$FFFFFFFF,$FFFFFFFF
	dc.l	$FFFFFFFF,$FFFFFFFF

	; Pointer to security code
	dc.l	Security

*******************************************************************************
* Security code
*******************************************************************************
Security:
	moveq	#0, d3
	
	tst.w	$a14(a5)
	bne	l2a53a
	
	movea.l	$a04(a5), a0
	move.w	$a08(a5), d7

l2a508:
	move.b	d0, $300001
	move.w	(a0), d1

	cmpi.b	#$ff, d1
	beq.s	l2a530

	move.w	2(a0),d0
	
	cmp.b	$ace(a5),d0
	bne.s	l2a530
	
	move.w	4(a0),d0
	
	cmp.b	$acf(a5),d0
	bne.s	l2a530
	
	cmp.b	$ad0(a5),d1
	beq.s	l2a538

l2a530:
	addq.l	#8,a0
	dbf	d7,l2a508

	move.w	d7,d3

l2a538:
	rts

l2a53a:
	movea.l	$a04(a5),a0
	move.w	$a08(a5),d7

l2a542:
	move.w	(a0),d1
	lsr.w	#8,d1
	
	cmpi.b	#$ff, d1
	beq.s	l2a566
	
	move.w	(a0), d0
	
	cmp.b	$ace(a5), d0
	bne.s	l2a566
	
	move.w	2(a0), d0
	lsr.w	#8, d0
	
	cmp.b	$acf(a5), d0
	bne.s	l2a566
	
	cmp.b	$ad0(a5), d1
	beq.s	l2a56e

l2a566:
	addq.l	#4, a0
	dbf	d7, l2a542
	move.w	d7, d3

l2a56e:
	rts

*******************************************************************************
* Header
*******************************************************************************
	cnop	0,4
JapaneseConfig:
	dc.b	'FROG FEAST JP   '
	dc.l	$FFFFFFFF
	dc.w	$0364
	dc.b	$14, $13, $24, $01

EnglishConfig:
	dc.b	'FROG FEAST EN   '
	dc.l	$FFFFFFFF
	dc.w	$0364
	dc.b	$14, $13, $24, $01

SpanishConfig:
	dc.b	'FROG FEAST SP   '
	dc.l	$FFFFFFFF
	dc.w	$0364
	dc.b	$14, $13, $24, $01

*******************************************************************************
* Irq1 interrupt routine
*******************************************************************************
	cnop	0,4
Irq1:
	; Bit 7 = 1 when NeoGeo logo is displayed
	tst.b	0x10FD80
	bmi.s	DisplayedLogo
	jmp	0xC00438			; NeoGeo logo display function

DisplayedLogo:
	movem.l	d0-d7/a0-a6,-(sp)

	move.b	d0, 0x300001			; Reset watchdog

	jsr	0xC0044A

	movem.l	(sp)+, d0-d7/a0-a6
	
	move.w	#4, 0x3C000C			; IRQ 1 acknowledge

	rte

*******************************************************************************
* Irq2 interrupt routine
*******************************************************************************
	cnop	0,4
Irq2:
	move.w	#2, $3C000C
	rte

*******************************************************************************
* Irq3 interrupt routine
*******************************************************************************
	cnop	0,4
Irq3:
	move.w	#1, $3C000C
	rte

*******************************************************************************
* Dummy interrupt routine
*******************************************************************************
	cnop	0,4
Dummy:
	rte

*******************************************************************************
* Main code
*******************************************************************************
	cnop	0,4
_start:
	lea	$10F300,sp			; Set stack pointer
	lea	0x108000,a5

	move.b	d0, $300001			; Reset watchdog
	move.w	#0, $3C0006			; ???
	
	move.b	#7, $3C000C			; Acknowledge all interrupts
	
	jsr	$C004C2				; Call bios routine
	jsr	$C004C8
	jsr	$C0044A
	
	bclr	#7,0x10FD80			; Enable manual reset
	move.w	#$2000, sr			; Enable interrupts

	jmp	main				; Jump to main
EndLoop:
	bra.s	EndLoop

*******************************************************************************
* 
*******************************************************************************
	cnop	0,4
Start2:
	rts

Start3:
	rts

Start4:
	rts

	cnop	0,4
__________________

Dernière modification par CeL 16/02/2010 à 15h52.
CeL est déconnecté   Réponse avec citation